Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Version = "dev"
Version is set via ldflags at build time.
Functions ¶
func CheckForUpdate ¶
func CheckForUpdate()
CheckForUpdate queries GitHub for the latest release and prints an update notice to stderr if a newer version exists. Fails silently on network errors or dev builds.
func DisableColors ¶
func DisableColors()
DisableColors resets all styles to plain text for non-interactive environments.
func Get ¶
func Get() string
Get returns the build version. If Version was not set via ldflags, it falls back to the module version from runtime/debug.ReadBuildInfo (populated automatically by go install ...@vX.Y.Z).
func PrintVersionWithUpdateCheck ¶
func PrintVersionWithUpdateCheck()
PrintVersionWithUpdateCheck prints the current version and whether an update is available. Used by the `version` subcommand.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.