Documentation
¶
Overview ¶
Package buildinfo exposes the build-time version string used by both the PeeringDB User-Agent and the OTel resource so they stay in lockstep.
Resolution order:
- injected — set via ldflags `-X github.com/dotwaffle/peeringdb-plus/internal/buildinfo.injected=<value>` at Docker build time (computed from `git describe --tags --always --dirty`). This is the production path: tagged releases emit `v1.17`, post-tag dev builds emit `v1.17-3-gabc1234`, dirty trees emit a `-dirty` suffix.
- Main.Version from runtime/debug.ReadBuildInfo — populated for `go install` of a tagged module path (the module-proxy path).
- vcs.revision (first 7 chars) from build settings — `go build` from a local checkout with `.git` present.
- Literal "unknown" — last resort.
Without injection (e.g. under `go test`), the test-mode binaries fall through to (3) or (4); the peeringdb User-Agent test asserts the surrounding shape, not the version literal, so test runs stay stable.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.