iris/context/context_go118.go
Gerasimos (Makis) Maropoulos 193de00426
minor
2022-04-10 01:11:11 +03:00

24 lines
377 B
Go

//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
}
}
}
}