Documentation
¶
Overview ¶
Package version exposes the gskill build version and source commit.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Commit ¶
func Commit() string
Commit returns the resolved source commit: the injected value when present, otherwise the VCS revision from the binary's build info (suffixed "+dirty" when the working tree was modified), otherwise an empty string.
func HasVCS ¶ added in v0.10.0
func HasVCS() bool
HasVCS reports whether the build info carries any vcs.* setting.
func ModulePath ¶ added in v0.10.0
func ModulePath() string
ModulePath returns the main module path from the build info, or "".
Types ¶
type BuildKind ¶ added in v0.10.0
type BuildKind string
BuildKind says where the running binary's version came from.
const ( // KindRelease is a binary built by the release pipeline, which injects the // version through ldflags. KindRelease BuildKind = "release" // KindModule is a `go install pkg@version` build: the version comes from the // module, and there is no VCS data because it was built from a module zip. KindModule BuildKind = "module" // KindDevelopment is any other build, such as a local `go build` in a checkout. KindDevelopment BuildKind = "development" )
Click to show internal directories.
Click to hide internal directories.