package static // UsageTemplate for goreleaser CLI. // nolint: gochecknoglobals const UsageTemplate = `{{define "FormatCommand"}}\ {{if .FlagSummary}} {{.FlagSummary}}{{end}}\ {{range .Args}} {{if not .Required}}[{{end}}<{{.Name}}>{{if .Value|IsCumulative}}...{{end}}{{if not .Required}}]{{end}}{{end}}\ {{end}}\ {{define "FormatCommands"}}\ {{range .FlattenedCommands}}\ {{if not .Hidden}}\ {{.FullCommand}}{{template "FormatCommand" .}}{{if .Default}} (default){{end}} {{.Help|Wrap 4}} {{end}}\ {{end}}\ {{end}}\ {{define "FormatUsage"}}\ {{template "FormatCommand" .}}{{if .Commands}} [ ...]{{end}} {{end}}\ {{if .Context.SelectedCommand}}\ {{with .Context.SelectedCommand.Help}}\ {{. | Wrap 0}} {{end}}\ {{else}}\ {{.App.Help | Wrap 0}} {{end}}\ USAGE: {{if .Context.SelectedCommand}}\ $ {{.App.Name}} {{.Context.SelectedCommand}}{{template "FormatUsage" .Context.SelectedCommand}} {{else}}\ $ {{.App.Name}}{{template "FormatUsage" .App}} {{end}}\ {{if .Context.Flags}}\ FLAGS: {{.Context.Flags|FlagsToTwoColumns|FormatTwoColumns}} {{end}}\ {{if .Context.Args}}\ ARGS: {{.Context.Args|ArgsToTwoColumns|FormatTwoColumns}} {{end}}\ {{if .Context.SelectedCommand}}\ {{if len .Context.SelectedCommand.Commands}}\ SUBCOMMANDS: {{template "FormatCommands" .Context.SelectedCommand}} {{end}}\ {{else if .App.Commands}}\ COMMANDS: {{template "FormatCommands" .App}} {{end}}\ `