cmd/dockerd: make cobra templates a const

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
This commit is contained in:
Sebastiaan van Stijn 2023-11-30 13:35:42 +01:00
parent 0f163170a7
commit 61d94850a7
No known key found for this signature in database
GPG key ID: 76698F39D527CE8C

View file

@ -46,7 +46,7 @@ func wrappedFlagUsages(cmd *cobra.Command) string {
return cmd.Flags().FlagUsagesWrapped(width - 1)
}
var usageTemplate = `Usage: {{.UseLine}}
const usageTemplate = `Usage: {{.UseLine}}
{{ .Short | trim }}
@ -70,5 +70,5 @@ Options:
{{- end}}
`
var helpTemplate = `
const helpTemplate = `
{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`