Make initHelpFlag public

Used for solving #424
This commit is contained in:
Albert Nigmatzianov
2017-04-27 10:55:15 +02:00
committed by Bjørn Erik Pedersen
parent db6b9a8b3f
commit fe69f2e3a3
2 changed files with 9 additions and 6 deletions

View File

@ -146,7 +146,7 @@ func TestInitHelpFlagMergesFlags(t *testing.T) {
cmd := Command{Use: "do"}
baseCmd.AddCommand(&cmd)
cmd.initHelpFlag()
cmd.InitDefaultHelpFlag()
actual := cmd.Flags().Lookup("help").Usage
if actual != usage {
t.Fatalf("Expected the help flag from the base command with usage '%s', but got the default with usage '%s'", usage, actual)