diff --git a/command.go b/command.go index 01f7c6f1c5..81016b450d 100644 --- a/command.go +++ b/command.go @@ -1115,7 +1115,7 @@ func (c *Command) ValidateRequiredFlags() error { }) if len(missingFlagNames) > 0 { - return fmt.Errorf(`required flag(s) "%s" not set`, strings.Join(missingFlagNames, `", "`)) + return fmt.Errorf(`required flag(s) %q not set`, strings.Join(missingFlagNames, `", "`)) } return nil } diff --git a/doc/man_docs.go b/doc/man_docs.go index b8c15ce885..a9c85dd244 100644 --- a/doc/man_docs.go +++ b/doc/man_docs.go @@ -146,7 +146,7 @@ func manPreamble(buf io.StringWriter, header *GenManHeader, cmd *cobra.Command, description = cmd.Short } - cobra.WriteStringAndCheck(buf, fmt.Sprintf(`%% "%s" "%s" "%s" "%s" "%s" + cobra.WriteStringAndCheck(buf, fmt.Sprintf(`%% %q %q %q %q %q # NAME `, header.Title, header.Section, header.date, header.Source, header.Manual)) cobra.WriteStringAndCheck(buf, fmt.Sprintf("%s \\- %s\n\n", dashedName, cmd.Short)) diff --git a/site/content/docgen/md.md b/site/content/docgen/md.md index 1659175cfd..b9ee76831e 100644 --- a/site/content/docgen/md.md +++ b/site/content/docgen/md.md @@ -90,7 +90,7 @@ The `filePrepender` will prepend the return value given the full filepath to the ```go const fmTemplate = `--- date: %s -title: "%s" +title: %q slug: %s url: %s --- diff --git a/site/content/docgen/rest.md b/site/content/docgen/rest.md index 3041c573ab..4f47019233 100644 --- a/site/content/docgen/rest.md +++ b/site/content/docgen/rest.md @@ -90,7 +90,7 @@ The `filePrepender` will prepend the return value given the full filepath to the ```go const fmTemplate = `--- date: %s -title: "%s" +title: %q slug: %s url: %s --- diff --git a/site/content/docgen/yaml.md b/site/content/docgen/yaml.md index 172e61d121..e8d735a154 100644 --- a/site/content/docgen/yaml.md +++ b/site/content/docgen/yaml.md @@ -87,7 +87,7 @@ The `filePrepender` will prepend the return value given the full filepath to the ```go const fmTemplate = `--- date: %s -title: "%s" +title: %q slug: %s url: %s ---