codies/internal/version/version.go

18 lines
353 B
Go
Raw Normal View History

2020-05-23 22:14:58 +00:00
// Package version provides a global version string.
package version
var version string
// Version returns a compile time version string, or "(devel)" if unset.
func Version() string {
if version == "" {
return "(devel)"
}
return version
}
// VersionSet returns true if the verison has been set.
func VersionSet() bool {
return version != ""
}