fix: Remove short options from conf.String() output#49
fix: Remove short options from conf.String() output#49ardan-bkennedy merged 1 commit intoardanlabs:masterfrom
Conversation
|
Can't we do this without the extra dependencies? |
|
I would not like to write custom sorting. It adds more complexity I think. Those deps for sorting only. |
|
I haven't looked at your code but the stdlib has sorting. I'll look at this during the week |
Thanks for the tip. It works :) |
0df231d to
736258c
Compare
| } | ||
|
|
||
| // longOptInfo constructs a long option description string. | ||
| func longOptInfo(fld Field) string { |
There was a problem hiding this comment.
Why add a new function when flagUsage won't be used anymore? Why not change change the flagUsage function?
There was a problem hiding this comment.
flagUsage() used in writeOptions() and it's functionality contains short flags for help output. So I decided to create a new function.
But I think both flagUsage() and longOptInfo() have two responsibilities. Would be better if they provided flag info only without formatting with spaces. But may be this is idea for next PR :)
There was a problem hiding this comment.
I hate these PR's because it's so hard to see everything. I will have time on Friday to properly review and publish this. Thanks
fixes #48
Also added sorting.