Make error handling more obvious

Again, the code looks a little more like a middle-schooler's code. But
that just makes it easier to understand and maintain.
This commit is contained in:
Eric Paris
2015-06-09 18:26:25 -04:00
parent 6f735782e0
commit 0a7a850026
2 changed files with 17 additions and 16 deletions

View File

@ -768,7 +768,7 @@ func TestRootNoCommandHelp(t *testing.T) {
func TestRootUnknownCommand(t *testing.T) {
r := noRRSetupTest("bogus")
s := "Error: unknown command \"bogus\"\nRun 'cobra-test help' for usage.\n"
s := "Error: unknown command \"bogus\"\nRun 'cobra-test --help' for usage.\n"
if r.Output != s {
t.Errorf("Unexpected response.\nExpecting to be:\n %q\nGot:\n %q\n", s, r.Output)