Documentation
¶
Overview ¶
Package cli implements the murmur command line.
The surface is built on github.com/urfave/cli/v3, which owns flag parsing, the command tree and help rendering. Main owns the process exit code, because the codes are a documented contract and a package that calls os.Exit cannot be tested: urfave/cli's default exit handling is replaced in command() with a no-op handler and the returned error is mapped to a code here instead. Two commitments shape the surface, and both are in:
- stdout carries data, stderr carries prose. The version string is data; a received payload is data, written as the bytes themselves, which is what makes `murmur decode > go.mod` a transfer rather than a parsing exercise. Help, tables, warnings and errors are prose.
- Every command that cannot yet do its job says so precisely, names the milestone that will implement it, and points at a command that does work. A scaffold that pretends to succeed is worse than one that refuses.
Index ¶
Constants ¶
View Source
const Version = "0.1.0-scaffold"
Version is the build version.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type App ¶
type App struct {
Stdout io.Writer
Stderr io.Writer
Stdin io.Reader
// Global flags, resolved from the command tree before any command action
// runs. Keeping the resolved values here rather than reading them from the
// command in every action means the policy helpers below (peakDBFS, schemes)
// have no dependency on the CLI library at all.
Loudness string
Profile string
Verbose bool
}
App holds the resolved global configuration and output streams.
Click to show internal directories.
Click to hide internal directories.