mirror of https://github.com/rocboss/paopao-ce
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
26 lines
392 B
26 lines
392 B
3 years ago
|
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,
|
||
|
}
|
||
|
}
|