Documentation
¶
Overview ¶
Package cmd wires up the cobra command tree for the Truestamp CLI. The main entrypoint (cmd/truestamp/main.go) calls Execute; everything else here registers subcommands, flags, and the shared PersistentPreRunE that loads the resolved configuration into [appConfig].
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Execute ¶
func Execute() (err error)
Execute runs the root command. Commands set SilenceErrors so cobra does not print their errors; Execute is the single place errors reach stderr. A command that needs silent-on-error UX (e.g. `verify --silent`) returns errSilentFail instead of the real error to opt out of printing. The upgrade --check flow uses exitCodeErr to return a specific exit code without also printing an error line.
An unrecovered panic anywhere under rootCmd.Execute() is caught by the deferred recover below: the panic value and stack are written to the log file as a `command_end` record at error level (so a "the CLI crashed" support report has a forensic trail), the same stack is re-emitted on stderr in the runtime's default `panic: <value>\n\n <stack>` format so the operator sees what they would have seen without our wrapper, and the process exits with code 2 (matching the Go runtime's default panic exit code).
Types ¶
This section is empty.
Source Files
¶
- auth.go
- beacon.go
- beacon_by_hash.go
- beacon_get.go
- beacon_list.go
- codec.go
- config.go
- console.go
- convert.go
- convert_id.go
- convert_keyid.go
- convert_merkle.go
- convert_proof.go
- convert_time.go
- create.go
- download.go
- hash.go
- internal_test_panic.go
- root.go
- team.go
- team_list.go
- team_set.go
- team_show.go
- team_unset.go
- upgrade.go
- verify.go
- version.go