Documentation
¶
Overview ¶
Package version holds the build identity of the binary.
The values are placeholders in a plain `go build` and are set at link time, so that a running instance can say which build it is:
go build -ldflags "-X github.com/altnovatrail/api/internal/version.Version=v0.1.0 ..."
The symbol path is spelled out because a wrong one is silent: the linker writes nothing, the build succeeds, and the binary reports "dev" forever. So the path is checked by linking a program with it and reading every value back.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Commit = "unknown"
Commit is the abbreviated hash of the git commit the binary was built from.
var Date = "unknown"
Date is when the binary was built, in RFC 3339, or "unknown" when the build did not say.
var Version = "dev"
Version is the release or tag the binary was built from. A build between tags says how far past one it is, and whether its tree held changes.
Functions ¶
func Engine ¶ added in v0.1.19
func Engine() string
Engine is the version of engine the binary is built with, which every engine's choice keeps (R06): engine has no constant of its version either.
func LearnerModel ¶ added in v0.1.18
func LearnerModel() string
LearnerModel is the version of learner-model the binary is built with, which the mark of the cache of the skill state names (R06): learner-model has no constant of its version. It is read as ModuleKit is, and is empty in a binary that recorded none.
func ModuleKit ¶ added in v0.1.15
func ModuleKit() string
ModuleKit is the version of module-kit the binary is built with, which every attempt keeps beside its package, so that its verdict repeats (R44). It is read from the list of modules the build records, as go.mod pins it, and is empty in a binary that recorded none or links no module-kit.
Types ¶
This section is empty.