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

flag: document that Usage implementations may os.Exit #21671

Closed
rsc opened this issue Aug 28, 2017 · 1 comment
Closed

flag: document that Usage implementations may os.Exit #21671

rsc opened this issue Aug 28, 2017 · 1 comment

Comments

@rsc
Copy link
Contributor

rsc commented Aug 28, 2017

We should document that a flag.Usage implementation is allowed to call os.Exit. See #21540 for related discussion.

@gopherbot
Copy link

Change https://golang.org/cl/59792 mentions this issue: flag: document that custom usage functions are free to call os.Exit

dominikh added a commit to dominikh/go-tools that referenced this issue Sep 4, 2017
The Go team clarified that calling os.Exit in usage functions is
perfectly fine. See the following links for further information:

- rsc/getopt@9e2cef2#commitcomment-23601620

- golang/go#21540 (comment)

- golang/go#21671

Closes gh-159
@golang golang locked and limited conversation to collaborators Aug 29, 2018
@rsc rsc unassigned robpike Jun 23, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants