Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upAdd HideHelpCommand #1083
Add HideHelpCommand #1083
Conversation
codecov
bot
commented
Mar 5, 2020
•
Codecov Report
@@ Coverage Diff @@
## master #1083 +/- ##
==========================================
+ Coverage 72.91% 73.18% +0.27%
==========================================
Files 33 33
Lines 2481 2480 -1
==========================================
+ Hits 1809 1815 +6
+ Misses 565 559 -6
+ Partials 107 106 -1
Continue to review full report at Codecov.
|
2426f97
to
3e5678c
|
Any chance to get v2.2.0 released soon with this? |
|
Looks good, thanks for pulling this together. I think the only thing left is getting the coverage check passing. |
4604362
to
2129edf
2129edf
to
75e7c52
| // append help to commands | ||
| if len(a.Commands) > 0 { | ||
| if a.Command(helpCommand.Name) == nil && !a.HideHelp { | ||
| a.appendCommand(helpCommand) | ||
|
|
||
| if HelpFlag != nil { | ||
| a.appendFlag(HelpFlag) | ||
| } | ||
| } | ||
| } |
This comment has been minimized.
This comment has been minimized.
lynncyrin
Mar 6, 2020
Member
Setup above, yeah?
This comment has been minimized.
This comment has been minimized.
AkihiroSuda
Mar 6, 2020
Author
Contributor
Yes, and because of the duplication, this code path was not executed and could not be covered with tests: #1083 (comment)
This comment has been minimized.
This comment has been minimized.
I can write up the release notes this weekend probs |
AkihiroSuda commentedMar 5, 2020
•
edited
What type of PR is this?
What this PR does / why we need it:
While
HideHelphides bothhelpcommand and--helpflag,HideHelpCommandonly hides
helpcommand and leave--helpflag as-is.The behavior of
HideHelpis untouched in this commit.Which issue(s) this PR fixes:
Fixes #523
Replaces #636
Testing
go test -v -run TestHideHelpCommandRelease Notes