Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

flagset.Output() missing from methods #318

Open
yarbelk opened this issue Jun 7, 2021 · 4 comments
Open

flagset.Output() missing from methods #318

yarbelk opened this issue Jun 7, 2021 · 4 comments

Comments

@yarbelk
Copy link

yarbelk commented Jun 7, 2021

Its in the stdlib flag interface; and when you're doing flagset specific Usage() functions, you kinda need it if you want to use the same output as the flag.Usage()...

@yarbelk
Copy link
Author

yarbelk commented Jun 7, 2021

Nope; its there: just doesn't have a tag.

@snebel29
Copy link

snebel29 commented Sep 16, 2021

@yarbelk What do you mean when you say It's there, just does not have a tag? I can't find the method in FlagSet.

@podhmo
Copy link

podhmo commented Oct 9, 2021

pflag/flag.go

Lines 258 to 265 in d5e0c06

// Output returns the destination for usage and error messages. os.Stderr is returned if
// output was not set or was set to nil.
func (f *FlagSet) Output() io.Writer {
if f.output == nil {
return os.Stderr
}
return f.output
}

In master branch, the Output() method is found. (PR #220)
But latest tagged version v1.0.5 does not include it.

@wkhere
Copy link

wkhere commented Jun 2, 2022

Hey, I use a commit with PR #220 merged extensively in my projects.
It would be great to have new tagged version containing it!
And this issue closed that way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants