-
Notifications
You must be signed in to change notification settings - Fork 3k
doc: Put description in separate section #2344
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
base: main
Are you sure you want to change the base?
Conversation
The `Long` description was prepended to the Synopsis section which it does not belong to - the synopsis should, by convention, only be the syntax of the command and its options. It's now added to a separate Description section.
|
I can add a test if you agree with the change. |
| } | ||
|
|
||
| if cmd.Runnable() { | ||
| if len(cmd.Long) > 0 { |
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 would this only be printed if long > 0 now?
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.
That was already the case. The ### Synopsis section header was previously printed in line 67, which was only printed if len(cmd.Long) > 0.
marckhouzam
left a comment
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.
Can you provide some kind of reference as to why we should use the new format you suggest? I don’t want someone to come along later with a different opinion to challenge this change.
My reasoning is that the synopsis should only contain the formal description of how to run the command and what command line options it takes (e.g. |
The
Longdescription was prepended to the Synopsis section which it does not belong to - the synopsis should, by convention, only be the syntax of the command and its options.It's now added to a separate Description section.