Only reset grammar when Apply()ing.
Also add a Kong.Help() function for writing context-sensitive help.
This commit is contained in:
+1
-1
@@ -25,7 +25,7 @@ func TestParseHandlingBadBuild(t *testing.T) {
|
||||
}
|
||||
}()
|
||||
|
||||
Parse(&cli, ExitFunction(func(_ int) { panic("exiting") }))
|
||||
Parse(&cli, Exit(func(_ int) { panic("exiting") }))
|
||||
|
||||
require.Fail(t, "we were expecting a panic")
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user