Documentation
¶
Overview ¶
Package args defines the Trice command-line interface.
It owns subcommand flag sets, parses command-line arguments, and dispatches to the corresponding runtime actions (log, help, version, add, insert, clean, generate, scan, display server, and shutdown).
Handler is the package entry point used by cmd/trice.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Version is injected at build time (typically by goreleaser). Version string // Commit is the VCS revision hash injected at build time. Commit string // Date is the build timestamp injected at build time. Date string // Verbose enables additional informational output. Verbose bool // Branch is the Git branch name at build time. Branch string // GitState indicates repository state at build time ("clean" or "dirty"). GitState string // GitStatus contains a '|' separated summary of modified files at build time. GitStatus string // BuiltBy is an optional builder identifier (see .goreleaser.yaml). BuiltBy string )
var (
// LogfileName is the filename of the logfile. "off" inhibits logfile writing.
LogfileName = "off"
)
Functions ¶
func Handler ¶
Handler parses args and executes the selected sub-command.
args is expected in os.Args form where args[0] is the executable name and args[1] is the sub-command.
func LogHandler ¶ added in v1.2.3
LogHandler parses log args and executes the log command.
args is expected in os.Args form where args[0] is the executable name and args[1:] are the log command flags. This makes `tlog ...` use the same code path as `trice log ...` without exposing the other trice sub-commands.
func RenderHelpText ¶ added in v1.2.0
RenderHelpText returns the help output for the passed help command arguments.
Types ¶
This section is empty.