Skip to content

Commit

Permalink
Improve subcommand help template
Browse files Browse the repository at this point in the history
Shows 'writeas' instead of generic 'command'
  • Loading branch information
thebaer committed Sep 1, 2015
1 parent 995d73d commit 80d0f76
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions writeas/cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,20 @@ func main() {
},
}

cli.CommandHelpTemplate = `NAME:
{{.Name}} - {{.Usage}}
USAGE:
writeas {{.Name}}{{if .Flags}} [command options]{{end}} [arguments...]{{if .Description}}
DESCRIPTION:
{{.Description}}{{end}}{{if .Flags}}
OPTIONS:
{{range .Flags}}{{.}}
{{end}}{{ end }}
`

app.Run(os.Args)
}

Expand Down

0 comments on commit 80d0f76

Please sign in to comment.