Commit Graph
14 Commits
Author SHA1 Message Date
Albert Nigmatzianov 6202b5942b Refactor flags mechanisms
I think It's more obvious now to understand the inheritance of flags.

Fix #403
Fix #404

Performance improvements:
benchmark                     old ns/op     new ns/op     delta
BenchmarkInheritedFlags-4     6536          5595          -14.40%
BenchmarkLocalFlags-4         3193          3235          +1.32%

benchmark                     old allocs     new allocs     delta
BenchmarkInheritedFlags-4     49             39             -20.41%
BenchmarkLocalFlags-4         23             21             -8.70%

benchmark                     old bytes     new bytes     delta
BenchmarkInheritedFlags-4     2040          1000          -50.98%
BenchmarkLocalFlags-4         1008          544           -46.03%
2017-04-20 15:38:50 +02:00
Albert Nigmatzianov b655df6ce8 Get rid of flagErrorBuf (#417)
Fix #27
2017-04-19 09:23:43 -04:00
Albert Nigmatzianov f95d58bdf3 Fix #401 (#402)
* doc: Add and edit docs

* doc: Add tests
2017-04-19 14:39:58 +02:00
Albert Nigmatzianov 9350054794 Keep only one newline between Aliases and Flags in help (#410)
Fix #409
2017-04-17 18:55:55 +02:00
Albert Nigmatzianov 6421115516 doc: Fix govet complaints (#408) 2017-04-01 15:45:39 -05:00
Albert Nigmatzianov 0960ff7fa9 Rename IsHelpCommand to IsAdditionalHelpTopicCommand (#398)
Fixes #393
2017-03-09 10:37:15 -05:00
Albert Nigmatzianov fcd0c5a1df Some fixes related to help command (#394)
* Add dots in the end of docs

* Make UsageTemplate show help command

Fix #366

* Fix output of help if it's invalid command
2017-02-28 14:17:48 -05:00
bogem 011f19e8ec Fix condition in HelpFunc
I think, it's more obvious, what does this method
2016-10-14 20:34:35 +02:00
bogem 5da98880f3 Edit documentation 2016-08-30 22:14:27 +05:00
bogem 101d434d44 Simplify OnInitialize func 2016-08-30 21:58:52 +05:00
bogem 71a9c0834b Simplify condition with err 2016-08-30 21:57:12 +05:00
bogem 6e17f4e2c5 Fix typos 2016-08-20 12:04:53 +05:00
bogem ec452170d2 Fix error messages in cobra_test 2016-08-20 12:02:26 +05:00
bogem 64cc91ac9b Fix typo in README 2016-02-06 17:38:32 +01:00