Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
feat(cli): implement personality for application name-agnostic help manuals #238
feat(cli): implement personality for application name-agnostic help manuals #238
Changes from all commits
846567f
ec2da23
2490d53
1dcba69
410136d
4fae76b
c5628ff
6daa931
5340cdf
0284255
f0ba2ed
1e8f2d9
7bcbbc3
6c855d3
2371484
b770a7e
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
In case of multiple services wouldn't the program name be useful in a panic?
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's fine -- I'd be happy to reinstate it as
{{.DisplayName}}
.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.
We probably had this discussion already ages ago, but can you please explain again why this changes from
".TH pebble 1 "
to".TH pebble "
, and why the slicing lengths change below?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.
The fact that I don't recall the details about this issue validates your point even further (: I'll look at it, fail again to find a better way to do this, and really document it this time.
(Also: see canonical/go-flags#5)
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.
So, apparently this is not changing from
.TH pebble 1
to.TH pebble
. What it's doing is identify the.TH <program name>
prefix, find it, and replace the man section number afterwards by an8
(instead of the default1
).The slicing lengths change from fixed magic numbers to the actual lengths of the prefix so that the code appears to be less magic than it was before.
The
w.programName
bit comes from the actual go-flags understanding of what is the program name (cmd.parser.Name
).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.
Thanks. If you could add an updated comment about what's going on here, that would be great.