Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrIsDevelopment = errors.New("this development binary has no semantic version")
ErrIsDevelopment is returned whenever functions are called that require a valid release version (generally, a valid semantic version) to parse.
Functions ¶
func IsDevelopment ¶
func IsDevelopment() bool
IsDevelopment returns true if the build type is not "release", and true otherwise. Note that checking whether the build type is "development" is not sufficient, because buildType may be empty when no ldflags are used.
func ShortString ¶
func ShortString() string
ShortString returns a machine-readable version string. If this is a release build, it returns the release version; otherwise, it returns the commit.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.