cmd

package
v0.7.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 23, 2026 License: MIT Imports: 43 Imported by: 0

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() 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.

func ExitCode added in v0.3.1

func ExitCode(err error) int

ExitCode returns the code to pass to os.Exit for a given error. Falls back to 1 for generic errors, 0 for nil, or the stored code when err wraps an exitCodeErr.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL