mirror of
https://github.com/kataras/iris.git
synced 2026-01-27 22:05:56 +00:00
minor
This commit is contained in:
23
context/context_go118.go
Normal file
23
context/context_go118.go
Normal 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
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user