Documentation
¶
Overview ¶
Package version provides build and version metadata for scut.
Version and BuildMetadata are set at compile time via ldflags:
go build -ldflags "-X github.com/ajbeck/scut/internal/version.Version=v0.1.0 \ -X github.com/ajbeck/scut/internal/version.BuildMetadata=abc123"
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var BuildMetadata string
BuildMetadata is additional build information such as a commit SHA. Set at compile time via -ldflags.
View Source
var Version = defaultVersion
Version is the semantic version of the application. Must include the "v" prefix (e.g., "v0.1.0", "v1.0.0-rc.1"). Set at compile time via -ldflags.
Functions ¶
func String ¶
func String() string
String returns the full semver string. When BuildMetadata is set the result is "vMAJOR.MINOR.PATCH[-PRERELEASE]+BUILD". An invalid Version is returned as-is with metadata appended.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.