Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CorrectCommand ¶
CorrectCommand writes the error message to STDERR explaining the command in the following format:
error: <message> <correct-command>
followed by os.Exit(1) call.
command should be a format string, containing `%s` for provided corrections.
func Error ¶
func Error(messages ...string)
Error writes provided error messages to STDERR in the following format:
error: <message 1> <message 2> ...
followed by os.Exit(1) call.
func ResolveOutput ¶
ResolveOutput is a helper function that accepts return of [*pflag.FlagSet.GetString](). If output is not specified (i.e. `err != nil`) or output is equal to dash (`-`), os.Stdout is returned. Otherwise ResolveOutput returns result of os.Create.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.