fetchcert/version.go

28 lines
379 B
Go
Raw Permalink Normal View History

package main
import "fmt"
var (
version = ""
commit = "unknown"
status = ""
target = "unknown/unknown"
)
func versionString() string {
var schar, ver string
if status == "dirty" {
schar = "*"
} else {
schar = ""
}
if version == "" {
ver = "development version"
} else {
ver = version
}
return fmt.Sprintf("%s (%s%s) %s", ver, commit, schar, target)
}