You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add exported functions to preserve pkg/flag compatibility (#220)
* Rename out() to Output()
This brings behavior inline with go's flag library, and allows for
printing output directly to whatever the current FlagSet is using for
output. This change will make it easier to correctly emit output to
stdout or stderr (e.g. a user has requested a help screen, which
should emit to stdout since it's the desired outcome).
* improve compat. with pkg/flag by adding Name()
pkg/flag has a public `Name()` function, which returns the name of the
flag set when called. This commit adds that function, as well as a
test for it.
* Streamline testing Name()
Testing `Name()` will move into its own explicit test, instead of
running inline during `TestAddFlagSet()`.
Co-authored-by: Chloe Kudryavtsev <[email protected]>
Co-authored-by: Chloe Kudryavtsev <[email protected]>
0 commit comments