mirror of
https://github.com/kataras/iris.git
synced 2025-01-23 10:41:03 +01:00
24 lines
379 B
Go
24 lines
379 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.Value
|
|
}
|
|
}
|
|
}
|
|
}
|