package cli import ( "os" "path" "github.com/codegangsta/cli" ) func init() { // See https://github.com/codegangsta/cli/pull/171/files cli.CommandHelpTemplate = `{{$DISCOVERY := or (eq .Name "manage") (eq .Name "join") (eq .Name "list")}}NAME: {{.Name}} - {{.Usage}} USAGE: ` + path.Base(os.Args[0]) + ` {{.Name}}{{if .Flags}} [options]{{end}} {{if $DISCOVERY}}{{end}}{{if .Description}} DESCRIPTION: {{.Description}}{{end}}{{if $DISCOVERY}} ARGUMENTS: discovery{{printf "\t"}}discovery service to use [$SWARM_DISCOVERY] {{printf "\t"}} * token:// {{printf "\t"}} * consul:/// {{printf "\t"}} * etcd://,/ {{printf "\t"}} * file://path/to/file {{printf "\t"}} * zk://,/ {{printf "\t"}} * ,{{end}}{{if .Flags}} OPTIONS: {{range .Flags}}{{.}} {{end}}{{if (eq .Name "manage")}}{{printf "\t * swarm.overcommit=0.05\tovercommit to apply on resources"}} {{printf "\t * swarm.heartbeat=25\ttime in second between each heartbeat"}}{{end}}{{ end }} ` }