We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi, this is a simple program that doesn't seem to work as intended : I have checked out v2.0.8 tag
package main import ( "fmt" "os" "gopkg.in/alecthomas/kingpin.v2" ) func main() { app := kingpin.New("test", "testApp").Action(action).PreAction(preAction).Terminate(terminate) fmt.Println(app.Parse(os.Args[1:])) } func action(c *kingpin.ParseContext) error { fmt.Println("ACTION") return nil } func preAction(c *kingpin.ParseContext) error { fmt.Println("PRE ACTION") return nil } func terminate(code int) { fmt.Println("TERMINATE") os.Exit(code) }
returns
ACTION ACTION <nil>
The text was updated successfully, but these errors were encountered:
d447053
Thanks for the catch. Copy and paste bug :(
FYI the termination handler will only execute if the parse fails, so you wouldn't expect to see TERMINATE in your example.
Sorry, something went wrong.
No branches or pull requests
Hi, this is a simple program that doesn't seem to work as intended :
I have checked out v2.0.8 tag
returns
The text was updated successfully, but these errors were encountered: