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.
compile_vars/vars.go

33 lines
469 B

package compile_vars
import (
_ "github.com/PCManiac/logrus_init"
log "github.com/sirupsen/logrus"
)
var (
version string
build_time string
)
func init() {
if version == "" {
version = "not set"
}
if build_time == "" {
build_time = "not set"
}
log.WithFields(log.Fields{
"version": version,
"build_time": build_time,
}).Info("Initializing.")
}
func GetVersion() string {
return version
}
func GetBuildTime() string {
return build_time
}