Documentation
¶
Overview ¶
Package cli is the cobra command tree for the amz CLI.
Index ¶
Constants ¶
View Source
const ( CodeOK = 0 CodeRuntime = 1 CodeUsage = 2 CodeNoData = 3 CodePartial = 4 CodeBlocked = 5 )
Exit codes (mirrors spec §6).
Variables ¶
View Source
var ( Version = "dev" Commit = "none" Date = "unknown" )
Version metadata, overridable at build time via -ldflags.
Functions ¶
Types ¶
type App ¶
type App struct {
Marketplace string
OutputFmt string
Fields string
Limit int
DataDir string
Workers int
Rate time.Duration
Retries int
Timeout time.Duration
Cookies string
UseAPI bool
Quiet bool
Verbose bool
Color string
NoCache bool
Refresh bool
DryRun bool
Raw bool
OutFile string
NoHeader bool
Template string
ConfigPath string
// Out is where rendered records go (cobra's stdout, or a file for -O).
Out io.Writer
}
App holds the resolved global flags shared by every command.
type Output ¶
type Output struct {
// contains filtered or unexported fields
}
Output renders rows in the chosen format, streaming where possible.
func NewOutput ¶
func NewOutput(w io.Writer, format Format, isTTY bool, fields []string, noHeader bool, tmpl string) (*Output, error)
NewOutput builds an Output for the resolved format.
Click to show internal directories.
Click to hide internal directories.