github.com/bdwilliams/libcompose@v0.3.1-0.20160826154243-d81a9bdacff0/cli/command/help.go (about) 1 package command 2 3 import ( 4 "github.com/urfave/cli" 5 "os" 6 "path" 7 ) 8 9 func init() { 10 cli.AppHelpTemplate = `Usage: {{.Name}} {{if .Flags}}[OPTIONS] {{end}}COMMAND [arg...] 11 12 {{.Usage}} 13 14 Version: {{.Version}}{{if or .Author .Email}} 15 16 Author:{{if .Author}} 17 {{.Author}}{{if .Email}} - <{{.Email}}>{{end}}{{else}} 18 {{.Email}}{{end}}{{end}} 19 {{if .Flags}} 20 Options: 21 {{range .Flags}}{{.}} 22 {{end}}{{end}} 23 Commands: 24 {{range .Commands}}{{.Name}}{{with .ShortName}}, {{.}}{{end}}{{ "\t" }}{{.Usage}} 25 {{end}} 26 Run '{{.Name}} COMMAND --help' for more information on a command. 27 ` 28 cli.CommandHelpTemplate = `Usage: ` + path.Base(os.Args[0]) + ` {{.Name}}{{if .Flags}} [OPTIONS] 29 30 {{.Usage}} 31 32 Options: 33 {{range .Flags}}{{.}} 34 {{end}}{{end}} 35 ` 36 37 }