github.com/google/syzkaller@v0.0.0-20240517125934-c0f1611a36d6/prog/meta.go (about) 1 // Copyright 2020 syzkaller project authors. All rights reserved. 2 // Use of this source code is governed by Apache 2 LICENSE that can be found in the LICENSE file. 3 4 package prog 5 6 import ( 7 "strings" 8 "time" 9 ) 10 11 var ( 12 GitRevision = "unknown" // emitted by Makefile, may contain + at the end 13 GitRevisionBase string // without + 14 gitRevisionDate string // emitted by Makefile 15 GitRevisionDate time.Time // parsed from gitRevisionDate 16 ) 17 18 func init() { 19 GitRevisionBase = strings.Replace(GitRevision, "+", "", -1) 20 if gitRevisionDate != "" { 21 var err error 22 if GitRevisionDate, err = time.Parse("20060102-150405", gitRevisionDate); err != nil { 23 panic(err) 24 } 25 } 26 }