-
Notifications
You must be signed in to change notification settings - Fork 54
fix: Remove short options from conf.String() output #49
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.