Adjust command hiding to use similar convention as hidden flags

plus breaking out "setup" portion of `App.Run` into its own method, cleaning up
some bits of the help templates, and allowing for runtime opt-in of displaying
template errors to stderr.
This commit is contained in:
Dan Buch
2016-05-03 06:54:05 -04:00
parent f397b1618c
commit cc481d6b0e
6 changed files with 80 additions and 20 deletions

View File

@@ -1124,8 +1124,8 @@ func TestApp_Run_Categories(t *testing.T) {
output := buf.String()
t.Logf("output: %q\n", buf.Bytes())
if !strings.Contains(output, "1:\n command1") {
t.Errorf("want buffer to include category %q, did not: \n%q", "1:\n command1", output)
if !strings.Contains(output, "1:\n command1") {
t.Errorf("want buffer to include category %q, did not: \n%q", "1:\n command1", output)
}
}