mirror of https://github.com/rocboss/paopao-ce
parent
3e08e7f90b
commit
be03c59338
@ -0,0 +1,25 @@
|
|||||||
|
package debug
|
||||||
|
|
||||||
|
import (
|
||||||
|
"fmt"
|
||||||
|
)
|
||||||
|
|
||||||
|
var version, commitID, buildDate string
|
||||||
|
|
||||||
|
type BuildInfo struct {
|
||||||
|
Version string
|
||||||
|
Sum string
|
||||||
|
BuildDate string
|
||||||
|
}
|
||||||
|
|
||||||
|
func VersionInfo() string {
|
||||||
|
return fmt.Sprintf("paopao %s (build:%s %s)", version, commitID, buildDate)
|
||||||
|
}
|
||||||
|
|
||||||
|
func ReadBuildInfo() *BuildInfo {
|
||||||
|
return &BuildInfo{
|
||||||
|
Version: version,
|
||||||
|
Sum: commitID,
|
||||||
|
BuildDate: buildDate,
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue