Documentation ¶
Overview ¶
version package provides build-time version information. It is designed to be used via the -ldflags option of go build.
e.g.
go build -ldflags "-X github.com/kunitsucom/util.go/version.version=${BUILD_VERSION} -X github.com/kunitsucom/util.go/version.revision=${BUILD_REVISION} -X github.com/kunitsucom/util.go/version.branch=${BUILD_BRANCH} -X github.com/kunitsucom/util.go/version.timestamp=${BUILD_TIMESTAMP}"
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BuildVersion ¶
type BuildVersion struct { Version string `json:"version"` Revision string `json:"revision"` Branch string `json:"branch"` Timestamp string `json:"timestamp"` GoVersion string `json:"goVersion"` GOARCH string `json:"goarch"` GOOS string `json:"goos"` }
func ReadBuildVersion ¶
func ReadBuildVersion() BuildVersion
Click to show internal directories.
Click to hide internal directories.