// SectionFlags is the help template section that displays the command's flags.
`{{ if or $visibleFlags.HasFlags $explicitlyExposedFlags.HasFlags}}
SectionFlags=`{{ if or $visibleFlags.HasFlags $explicitlyExposedFlags.HasFlags}}Options:
{{ if $visibleFlags.HasFlags}}{{trimRight (flagsUsages $visibleFlags)}}{{end}}{{ if $explicitlyExposedFlags.HasFlags}}{{trimRight (flagsUsages $explicitlyExposedFlags)}}{{end}}
Options:
{{end}}`
{{ if $visibleFlags.HasFlags}}{{flagsUsages $visibleFlags}}{{end}}{{ if $explicitlyExposedFlags.HasFlags}}{{flagsUsages $explicitlyExposedFlags}}{{end}}{{end}}`+
// USAGE LINE
// SectionUsage is the help template section that displays the command's usage.
`{{if and .Runnable (ne .UseLine "") (ne .UseLine $rootCmd)}}
SectionUsage=`{{if and .Runnable (ne .UseLine "") (ne .UseLine $rootCmd)}}Usage:
Usage:
{{$usageLine}}
{{$usageLine}}
{{end}}`+
// TIPS: --help
{{end}}`
`{{ if .HasSubCommands }}
Use "{{$rootCmd}} <command> --help" for more information about a given command.{{end}}`+
// SectionTipsHelp is the help template section that displays the '--help' hint.
SectionTipsHelp=`{{if .HasSubCommands}}Use "{{$rootCmd}} <command> --help" for more information about a given command.
{{end}}`
// TIPS: global options
// SectionTipsGlobalOptions is the help template section that displays the 'options' hint for displaying global flags.
`{{ if $optionsCmdFor}}
SectionTipsGlobalOptions=`{{if $optionsCmdFor}}Use "{{$optionsCmdFor}}" for a list of global command-line options (applies to all commands).
Use "{{$optionsCmdFor}}" for a list of global command-line options (applies to all commands).{{end}}`
{{end}}`
)
optionsHelpTemplate=``
// MainHelpTemplate if the template for 'help' used by most commands.
funcMainHelpTemplate()string{
return`{{with or .Long .Short }}{{. | trim}}{{end}}{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`
}
optionsUsageTemplate=`{{ if .HasInheritedFlags}}The following options can be passed to any command:
// MainUsageTemplate if the template for 'usage' used by most commands.