mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 00:13:49 +01:00
help: cleanup template syntax (consistent whitespace)
This commit is contained in:
parent
62233b4993
commit
303358eeda
28
cmd/help.go
28
cmd/help.go
@ -216,13 +216,13 @@ Examples:
|
|||||||
{{.Example}}{{end}}{{if and (showCommands .) .HasAvailableSubCommands}}
|
{{.Example}}{{end}}{{if and (showCommands .) .HasAvailableSubCommands}}
|
||||||
|
|
||||||
Available commands:{{range .Commands}}{{if (or .IsAvailableCommand (eq .Name "help"))}}
|
Available commands:{{range .Commands}}{{if (or .IsAvailableCommand (eq .Name "help"))}}
|
||||||
{{rpad .Name .NamePadding }} {{.Short}}{{end}}{{end}}{{end}}{{if and (showLocalFlags .) .HasAvailableLocalFlags}}
|
{{rpad .Name .NamePadding}} {{.Short}}{{end}}{{end}}{{end}}{{if and (showLocalFlags .) .HasAvailableLocalFlags}}
|
||||||
|
|
||||||
Flags:
|
Flags:
|
||||||
{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if and (showGlobalFlags .) .HasAvailableInheritedFlags}}{{ range flagGroups . }}{{ if .Flags.HasFlags }}
|
{{.LocalFlags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{if and (showGlobalFlags .) .HasAvailableInheritedFlags}}{{range flagGroups .}}{{if .Flags.HasFlags}}
|
||||||
|
|
||||||
{{ .Help }} (flag group {{ .Name }}):
|
{{.Help}} (flag group {{.Name}}):
|
||||||
{{ .Flags.FlagUsages | trimTrailingWhitespaces}}{{ end }}{{ end }}{{end}}{{if .HasHelpSubCommands}}
|
{{.Flags.FlagUsages | trimTrailingWhitespaces}}{{end}}{{end}}{{end}}{{if .HasHelpSubCommands}}
|
||||||
|
|
||||||
Additional help topics:{{range .Commands}}{{if .IsAdditionalHelpTopicCommand}}
|
Additional help topics:{{range .Commands}}{{if .IsAdditionalHelpTopicCommand}}
|
||||||
{{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}
|
{{rpad .CommandPath .CommandPathPadding}} {{.Short}}{{end}}{{end}}{{end}}
|
||||||
@ -232,14 +232,14 @@ Use "rclone help flags" for to see the global flags.
|
|||||||
Use "rclone help backends" for a list of supported services.
|
Use "rclone help backends" for a list of supported services.
|
||||||
`
|
`
|
||||||
|
|
||||||
var filterFlagsSingleGroupTemplate = `{{ range flagGroups . }}{{ if .Flags.HasFlags }}{{ .Flags.FlagUsages | trimTrailingWhitespaces}}
|
var filterFlagsSingleGroupTemplate = `{{range flagGroups .}}{{if .Flags.HasFlags}}{{.Flags.FlagUsages | trimTrailingWhitespaces}}
|
||||||
{{ end }}{{ end }}
|
{{end}}{{end}}
|
||||||
`
|
`
|
||||||
|
|
||||||
var filterFlagsMultiGroupTemplate = `{{ range flagGroups . }}{{ if .Flags.HasFlags }}{{ .Help }} (flag group {{ .Name }}):
|
var filterFlagsMultiGroupTemplate = `{{range flagGroups .}}{{if .Flags.HasFlags}}{{.Help}} (flag group {{.Name}}):
|
||||||
{{ .Flags.FlagUsages | trimTrailingWhitespaces}}
|
{{.Flags.FlagUsages | trimTrailingWhitespaces}}
|
||||||
|
|
||||||
{{ end }}{{ end }}`
|
{{end}}{{end}}`
|
||||||
|
|
||||||
var docFlagsTemplate = `---
|
var docFlagsTemplate = `---
|
||||||
title: "Global Flags"
|
title: "Global Flags"
|
||||||
@ -251,16 +251,16 @@ description: "Rclone Global Flags"
|
|||||||
This describes the global flags available to every rclone command
|
This describes the global flags available to every rclone command
|
||||||
split into groups.
|
split into groups.
|
||||||
|
|
||||||
{{ range flagGroups . }}{{ if .Flags.HasFlags }}
|
{{range flagGroups .}}{{if .Flags.HasFlags}}
|
||||||
## {{ .Name }}
|
## {{.Name}}
|
||||||
|
|
||||||
{{ .Help }}.
|
{{.Help}}.
|
||||||
|
|
||||||
` + "```" + `
|
` + "```" + `
|
||||||
{{ .Flags.FlagUsages | trimTrailingWhitespaces}}
|
{{.Flags.FlagUsages | trimTrailingWhitespaces}}
|
||||||
` + "```" + `
|
` + "```" + `
|
||||||
|
|
||||||
{{ end }}{{ end }}
|
{{end}}{{end}}
|
||||||
`
|
`
|
||||||
|
|
||||||
// show all the backends
|
// show all the backends
|
||||||
|
Loading…
Reference in New Issue
Block a user