Documentation
¶
Overview ¶
Package app is da-transcript itself: the flags, the store, the rendering and the tail. The root main.go is a shim over Main below, and carries the command's own documentation, where `go doc` looks for it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Main ¶
func Main()
Main is the command: it runs the line it was given and sets the exit status. A command line pflag itself rejects — an unknown flag, a missing value — exits 2, the way argparse does; a flag whose value this package rejects, and every other failure, exits 1. Ctrl-C or SIGTERM exits 130 without a word, except once --follow is tailing: that is how a tail is meant to end, and it exits 0.
An error can hold whatever a path or an argument does — pflag echoes a flag name as typed, a failed write names its file — so it is made harmless here, where every one is printed: on one line for a usage error, and keeping its lines for the rest, where a second line can be a hint.