Documentation
¶
Overview ¶
Package version holds the shared types and helpers used by each binary's version subpackage (pkg/version/cli and pkg/version/daemon). The two subpackages each embed their own VERSION + COMMIT and register themselves here at init time via SetCurrent so shared code (internal/...) can read the running binary's version through Get / Number / Commit without knowing which binary it belongs to.
Index ¶
Constants ¶
const ( FormatYAML = "yaml" FormatJSON = "json" )
Variables ¶
This section is empty.
Functions ¶
func NewCmd ¶ added in v0.18.0
NewCmd returns a "version" Cobra command that prints the Info returned by getter. Each binary's version subpackage instantiates this with its own Get function so the parent package stays free of binary-specific state.
func SetCurrent ¶ added in v0.18.0
func SetCurrent(info Info)
SetCurrent registers the running binary's Info. Called from each binary's pkg/version/{cli,daemon} subpackage init().
Types ¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package cli is the version subpackage owned by the solo-provisioner CLI binary.
|
Package cli is the version subpackage owned by the solo-provisioner CLI binary. |
|
Package daemon is the version subpackage owned by the solo-provisioner-daemon binary.
|
Package daemon is the version subpackage owned by the solo-provisioner-daemon binary. |