package cli import ( "os" "path" "github.com/codegangsta/cli" ) func init() { cli.AppHelpTemplate = `Usage: {{.Name}} {{if .Flags}}[OPTIONS] {{end}}COMMAND [arg...] {{.Usage}} Version: {{.Version}}{{if or .Author .Email}} Author:{{if .Author}} {{.Author}}{{if .Email}} - <{{.Email}}>{{end}}{{else}} {{.Email}}{{end}}{{end}} {{if .Flags}} Options: {{range .Flags}}{{.}} {{end}}{{end}} Commands: {{range .Commands}}{{.Name}}{{with .ShortName}}, {{.}}{{end}}{{ "\t" }}{{.Usage}} {{end}} Run '{{.Name}} COMMAND --help' for more information on a command. ` // See https://github.com/codegangsta/cli/pull/171/files cli.CommandHelpTemplate = `{{$DISCOVERY := or (eq .Name "manage") (eq .Name "join") (eq .Name "list")}}Usage: ` + path.Base(os.Args[0]) + ` {{.Name}}{{if .Flags}} [OPTIONS]{{end}} {{if $DISCOVERY}}{{end}} {{.Usage}}{{if $DISCOVERY}} Arguments: discovery service to use [$SWARM_DISCOVERY] * token:// * consul:/// * etcd://,/ * file://path/to/file * zk://,/ * [nodes://],{{end}}{{if .Flags}} Options: {{range .Flags}}{{.}} {{end}}{{if (eq .Name "manage")}}{{printf "\t * swarm.overcommit=0.05\tovercommit to apply on resources"}} {{printf "\t * mesos.address=\taddress to bind on [$SWARM_MESOS_ADDRESS]"}} {{printf "\t * mesos.port=\tport to bind on [$SWARM_MESOS_PORT]"}} {{printf "\t * mesos.offertimeout=30s\ttimeout for offers [$SWARM_MESOS_OFFER_TIMEOUT]"}} {{printf "\t * mesos.tasktimeout=5s\ttimeout for task creation [$SWARM_MESOS_TASK_TIMEOUT]"}} {{printf "\t * mesos.user=\tframework user [$SWARM_MESOS_USER]"}}{{end}}{{ end }} ` }