Skip to content
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

Improve docs generation for cli.Authors #900

Merged
merged 4 commits into from Nov 21, 2019

Conversation

saschagrunert
Copy link
Member

This allows specifying multiple authors, whereas no available authors
will be formatted correctly now.

@saschagrunert saschagrunert requested a review from a team as a code owner September 19, 2019 12:30
@codecov
Copy link

codecov bot commented Sep 20, 2019

Codecov Report

Merging #900 into master will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #900   +/-   ##
=======================================
  Coverage   72.89%   72.89%           
=======================================
  Files          32       32           
  Lines        2439     2439           
=======================================
  Hits         1778     1778           
  Misses        550      550           
  Partials      111      111

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 4032749...d126101. Read the comment docs.

coilysiren
coilysiren previously approved these changes Sep 25, 2019
Copy link
Member

@coilysiren coilysiren left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍👍👍

% {{ .App.Author }}
var MarkdownDocTemplate = `% {{ .App.Name }}(8){{ if .App.Description }} {{ .App.Description }}{{ end }}
{{ range $a := .App.Authors }}
% {{ $a }}{{ end }}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whst if authors is not set just author, that would be confusing as it would not work.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought this will catch it, doesn't it?

cli/app.go

Lines 142 to 144 in 63cd2e3

if a.Author != "" || a.Email != "" {
a.Authors = append(a.Authors, Author{Name: a.Author, Email: a.Email})
}

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes.

@saschagrunert
Copy link
Member Author

@AudriusButkevicius may I ping you to merge this or review it again please? =)

@coilysiren
Copy link
Member

PR has merge conflicts now!

This allows specifying multiple authors, whereas no available authors
will be formatted correctly now.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
@saschagrunert
Copy link
Member Author

Rebased on top of the master branch, please take a look 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants