Only reset grammar when Apply()ing.

Also add a Kong.Help() function for writing context-sensitive help.
This commit is contained in:
Alec Thomas
2018-06-13 12:07:35 +10:00
parent 9db476cc81
commit 29fe92f286
8 changed files with 132 additions and 88 deletions
+1 -1
View File
@@ -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")
}