Documentation
¶
Overview ¶
Package version provides build-time version information for the CLI. Variables are populated via ldflags during the build process.
Example build command:
go build -ldflags "-X github.com/StackEye-IO/stackeye-cli/internal/version.Version=1.0.0 \ -X github.com/StackEye-IO/stackeye-cli/internal/version.Commit=$(git rev-parse --short HEAD) \ -X github.com/StackEye-IO/stackeye-cli/internal/version.Date=$(date -u +%Y-%m-%dT%H:%M:%SZ) \ -X github.com/StackEye-IO/stackeye-cli/internal/version.BuiltBy=makefile"
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Version is the semantic version of the CLI (e.g., "1.0.0", "1.0.0-dirty"). // Set via: -X github.com/StackEye-IO/stackeye-cli/internal/version.Version=... Version = "dev" // Commit is the short git commit SHA at build time. // Set via: -X github.com/StackEye-IO/stackeye-cli/internal/version.Commit=... Commit = "none" // Date is the UTC timestamp when the binary was built. // Set via: -X github.com/StackEye-IO/stackeye-cli/internal/version.Date=... Date = "unknown" // BuiltBy indicates how the binary was built (e.g., "goreleaser", "makefile", "go install"). // Set via: -X github.com/StackEye-IO/stackeye-cli/internal/version.BuiltBy=... BuiltBy = "unknown" )
Build information variables, set via ldflags at compile time.
Functions ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.