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

Make the exit code example more clear #823

Merged
merged 3 commits into from
Aug 4, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -902,14 +902,14 @@ import (
func main() {
app := cli.NewApp()
app.Flags = []cli.Flag{
cli.BoolTFlag{
cli.BoolFlag{
Name: "ginger-crouton",
Usage: "is it in the soup?",
Usage: "Add ginger croutons to the soup",
},
}
app.Action = func(ctx *cli.Context) error {
if !ctx.Bool("ginger-crouton") {
return cli.NewExitError("it is not in the soup", 86)
return cli.NewExitError("Ginger croutons are not in the soup", 86)
}
return nil
}
Expand Down