From ec452170d21fadd9e927f24ae471a258dc545261 Mon Sep 17 00:00:00 2001 From: bogem Date: Sat, 20 Aug 2016 12:02:26 +0500 Subject: [PATCH 1/2] Fix error messages in cobra_test --- cobra_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cobra_test.go b/cobra_test.go index 881a621d..f23da7b8 100644 --- a/cobra_test.go +++ b/cobra_test.go @@ -919,12 +919,12 @@ func TestRootUnknownCommandSilenced(t *testing.T) { s := "Run 'cobra-test --help' for usage.\n" if r.Output != "" { - t.Errorf("Unexpected response.\nExpecting to be: \n\"\"\n Got:\n %q\n", s, r.Output) + t.Errorf("Unexpected response.\nExpecting to be:\n %q\nGot:\n %q\n", s, r.Output) } r = noRRSetupTestSilenced("--strtwo=a bogus") if r.Output != "" { - t.Errorf("Unexpected response.\nExpecting to be:\n\"\"\nGot:\n %q\n", s, r.Output) + t.Errorf("Unexpected response.\nExpecting to be:\n %q\nGot:\n %q\n", s, r.Output) } } From 6e17f4e2c52c2de7e44f5bab2c77bb9edb90b9f5 Mon Sep 17 00:00:00 2001 From: bogem Date: Sat, 20 Aug 2016 12:04:53 +0500 Subject: [PATCH 2/2] Fix typos --- bash_completions.go | 2 +- command.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bash_completions.go b/bash_completions.go index 5b3e855b..c9b43d98 100644 --- a/bash_completions.go +++ b/bash_completions.go @@ -11,7 +11,7 @@ import ( ) const ( - BashCompFilenameExt = "cobra_annotation_bash_completion_filename_extentions" + BashCompFilenameExt = "cobra_annotation_bash_completion_filename_extensions" BashCompCustom = "cobra_annotation_bash_completion_custom" BashCompOneRequiredFlag = "cobra_annotation_bash_completion_one_required_flag" BashCompSubdirsInDir = "cobra_annotation_bash_completion_subdirs_in_dir" diff --git a/command.go b/command.go index 083e4ea7..9521036f 100644 --- a/command.go +++ b/command.go @@ -993,7 +993,7 @@ func (c *Command) IsHelpCommand() bool { return true } -// HasHelpSubCommands determines if a command has any avilable 'help' sub commands +// HasHelpSubCommands determines if a command has any available 'help' sub commands // that need to be shown in the usage/help default template under 'additional help // topics' func (c *Command) HasHelpSubCommands() bool {