1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-27 22:05:56 +00:00
This commit is contained in:
Gerasimos (Makis) Maropoulos
2022-04-10 01:11:11 +03:00
parent b0ccd579af
commit 193de00426
3 changed files with 27 additions and 19 deletions

23
context/context_go118.go Normal file
View File

@@ -0,0 +1,23 @@
//go:build go1.18
package context
import "runtime/debug"
func init() {
if info, ok := debug.ReadBuildInfo(); ok {
for _, setting := range info.Settings {
if BuildRevision != "" && BuildTime != "" {
break
}
if setting.Key == "vcs.revision" {
BuildRevision = setting.Value
}
if setting.Key == "vcs.time" {
BuildTime = setting.Key
}
}
}
}