diff --git a/document.go b/document.go index 7958155..e841ed9 100644 --- a/document.go +++ b/document.go @@ -24,7 +24,7 @@ func getDocs(app *cli.App, logger *logrus.Logger) string { buffer := bytes.Buffer{} buffer.WriteString(fmt.Sprintf("# `%s`\n\n", app.Name)) - buffer.WriteString(fmt.Sprintf("%s\n%s - <%s>\n\n", app.Usage, app.Version, app.Authors[0].String())) + buffer.WriteString(fmt.Sprintf("%s\n%s\n", app.Usage, app.Version)) if app.Description != "" { buffer.WriteString(app.Description) @@ -64,10 +64,15 @@ func getDocs(app *cli.App, logger *logrus.Logger) string { for _, flag := range app.Flags { buffer.WriteString(fmt.Sprintf("- `%s`\n", flag.String())) } - buffer.WriteString("\n\n") + buffer.WriteString("\n") + } + + buffer.WriteString("Authors\n") + for _, author := range app.Authors { + buffer.WriteString(fmt.Sprintf(" - %s\n", author.String())) } - buffer.WriteString("###### Auto generated by nikhilsbhat/urfavecli-docgen on " + time.Now().Format("2-Jan-2006") + "\n") + buffer.WriteString("\n###### Auto generated by nikhilsbhat/urfavecli-docgen on " + time.Now().Format("2-Jan-2006") + "\n") return buffer.String() }