Documentation ¶ Index ¶ Variables func Parse(v string) (version string, revision string, err error) func ShowAndExit(short bool) type Version func Current() Version Constants ¶ This section is empty. Variables ¶ View Source var ( // Branch of the code Branch = "{branch}" // Revision of the code Revision = "{revision}" // Dirty flag shows if the binary is built from a // repo with uncommitted changes Dirty = "{dirty}" ) Functions ¶ func Parse ¶ func Parse(v string) (version string, revision string, err error) Parse version string func ShowAndExit ¶ func ShowAndExit(short bool) ShowAndExit prints the version and exits Types ¶ type Version ¶ type Version interface { Short() string String() string } Version interface func Current ¶ func Current() Version Current get current version Source Files ¶ View all Source files version.go Click to show internal directories. Click to hide internal directories.