Documentation ¶
Overview ¶
Package version defines version information.
Index ¶
- Variables
- func NewVersion() *machineapi.VersionInfo
- func OSRelease() ([]byte, error)
- func PrintLongVersion()
- func PrintLongVersionFromExisting(v *machineapi.VersionInfo)
- func PrintShortVersion()
- func Short() string
- func Trim(version string) string
- func WriteLongVersionFromExisting(w io.Writer, v *machineapi.VersionInfo)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Name is set at build time. Name = gendata.VersionName // Tag is set at build time. Tag = gendata.VersionTag // SHA is set at build time. SHA = gendata.VersionSHA // Built is set at build time. // TODO: its not. Built string // PkgsVersion is set at build time. PkgsVersion = gendata.VersionPkgs // ExtrasVersion is set at build time. ExtrasVersion = gendata.VersionExtras )
Functions ¶
func NewVersion ¶
func NewVersion() *machineapi.VersionInfo
NewVersion prints verbose version information.
func PrintLongVersion ¶
func PrintLongVersion()
PrintLongVersion prints verbose version information.
func PrintLongVersionFromExisting ¶
func PrintLongVersionFromExisting(v *machineapi.VersionInfo)
PrintLongVersionFromExisting prints verbose version information.
func Short ¶
func Short() string
Short returns the short version string consist of name, tag and SHA.
func Trim ¶ added in v1.4.0
Trim removes anything extra after semantic version core, `v0.3.2-1-abcd` -> `v0.3.2`.
func WriteLongVersionFromExisting ¶
func WriteLongVersionFromExisting(w io.Writer, v *machineapi.VersionInfo)
WriteLongVersionFromExisting writes verbose version to io.Writer.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.