go-flags icon indicating copy to clipboard operation
go-flags copied to clipboard

Some errors automatically outputting content to stderr, while some others aren't

Open Arteneko opened this issue 5 years ago • 2 comments

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?

Arteneko avatar May 13 '19 15:05 Arteneko

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).

atc0005 avatar Sep 23 '19 02:09 atc0005

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 ...

oubiwann avatar Feb 02 '22 18:02 oubiwann