Improve docs generation for cli.Authors

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

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
This commit is contained in:
Sascha Grunert
2019-09-19 14:29:06 +02:00
parent 05874240ed
commit 2cb62f5091
8 changed files with 97 additions and 14 deletions

View File

@@ -71,10 +71,9 @@ OPTIONS:
{{end}}{{end}}
`
var MarkdownDocTemplate = `% {{ .App.Name }}(8) {{ .App.Description }}
{{ range $Author := .App.Authors}}
% {{ $Author.Name }}
{{- end}}
var MarkdownDocTemplate = `% {{ .App.Name }}(8){{ if .App.Description }} {{ .App.Description }}{{ end }}
{{ range $a := .App.Authors }}
% {{ $a }}{{ end }}
# NAME