Documentation
¶
Overview ¶
Package cli is the command line front door: it defines the Cobra commands, maps results to exit codes and carries the build version, commit and date injected by ldflags.
Index ¶
Constants ¶
const ( // ExitOK: nothing matched fail_on. ExitOK = 0 // ExitFindings: at least one unsuppressed finding matched fail_on. ExitFindings = 1 // ExitUsage: a usage error or a fatal runtime error. ExitUsage = 2 )
Exit codes. Only this package maps outcomes to exit codes.
Variables ¶
var ( Version = defaultVersion Commit = defaultCommit Date = defaultDate )
Build metadata, injected at link time by GoReleaser through ldflags:
-X github.com/aiagentpro/tokenhound/internal/cli.Version=...
When a value is not injected (go install, make build), BuildInfo falls back to the module version and VCS stamps the Go toolchain embeds.
Functions ¶
func BuildInfo ¶
func BuildInfo() (version, commit, date string)
BuildInfo returns the version, commit and date of this binary: the ldflags values when set, otherwise the values recorded by the Go toolchain.
Types ¶
This section is empty.