go-flags
go-flags copied to clipboard
Some errors automatically outputting content to stderr, while some others aren't
I encountered a problem: Some errors, like Usage, are directly outputting data on the standard output when some others, like "Please specify the [...] command" aren't.
Could the list of auto-outputting errors be documented, or could a standard behaviour be decided?
Potentially related:
Configure the options struct to have a short
name longer than 1 character (e.g., rm
as short for remove
). This failed silently for me (I'm new to Go, so this threw me for a loop).
I've addressed this in an error-wrapping lib for go-flags, here:
- https://github.com/geomyidia/flagswrap
At least until go-flags gets more maintenance and gets an error-handling update ...