Documentation
¶
Overview ¶
Package build carries what the deployment stamps into the binary at link time. Set with -ldflags:
-X github.com/backplane-labs/backplane/pkg/backplane/build.Service=hello -X github.com/backplane-labs/backplane/pkg/backplane/build.Version=1.2.0 -X github.com/backplane-labs/backplane/pkg/backplane/build.Commit=$(git rev-parse HEAD) -X github.com/backplane-labs/backplane/pkg/backplane/build.Date=$(date -u +%FT%TZ)
Everything falls back to debug.ReadBuildInfo: Service to the last element of the main package path (".../cmd/hello" -> "hello"), so `go run` works; stamp it for anything deployed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( Service string Version string Commit string Date string )
Set by the linker.
View Source
var ErrUnnamed = errors.New("service name unknown: stamp build.Service with -ldflags -X")
ErrUnnamed: no name was stamped, given, or derivable from build info.
Functions ¶
This section is empty.
Types ¶
Click to show internal directories.
Click to hide internal directories.