Documentation
¶
Overview ¶
Package cli is the shared flaggy wrapper (D23).
flaggy: zero deps, flags at any position, shell completion scripts. Individual tools keep ShowCompletion off so a query like "completion" is not stolen; dump scripts with bin/shell/complete.go.
Index ¶
- Constants
- Variables
- func BashScript(tools []Tool) string
- func BindQA(c *QAStats) *flaggy.Parser
- func Code(err error) int
- func Fail(err error) int
- func New(name string) *flaggy.Parser
- func Parse(p *flaggy.Parser, args []string) error
- func QAParser() *flaggy.Parser
- func Query(first string, trailing []string) string
- type QAStats
- type Tool
Constants ¶
View Source
const ExitSkip = 3
ExitSkip is the exit code a tool returns when its work is deliberately not run — credentials or a source session are missing (e.g. chats without TELEGRAM_* / LINKEDIN_* config). The stack wave prints SKIP for it and does not count it as a failure.
Variables ¶
View Source
var ErrHelp = errors.New("help")
ErrHelp means -h/--help was requested (exit 0).
Functions ¶
func BashScript ¶
BashScript concatenates flaggy bash complete scripts and binds each function to the shebang path (./bin/subject/method.go).
Types ¶
Click to show internal directories.
Click to hide internal directories.