all: refactor to use %q instead of "%s"

This commit is contained in:
Jes Cok 2023-07-21 13:04:44 +08:00
parent 66b215ba18
commit e587892673
4 changed files with 4 additions and 4 deletions

View file

@ -146,7 +146,7 @@ func manPreamble(buf io.StringWriter, header *GenManHeader, cmd *cobra.Command,
description = cmd.Short description = cmd.Short
} }
cobra.WriteStringAndCheck(buf, fmt.Sprintf(`%% "%s" "%s" "%s" "%s" "%s" cobra.WriteStringAndCheck(buf, fmt.Sprintf(`%% %q %q %q %q %q
# NAME # NAME
`, header.Title, header.Section, header.date, header.Source, header.Manual)) `, header.Title, header.Section, header.date, header.Source, header.Manual))
cobra.WriteStringAndCheck(buf, fmt.Sprintf("%s \\- %s\n\n", dashedName, cmd.Short)) cobra.WriteStringAndCheck(buf, fmt.Sprintf("%s \\- %s\n\n", dashedName, cmd.Short))

View file

@ -90,7 +90,7 @@ The `filePrepender` will prepend the return value given the full filepath to the
```go ```go
const fmTemplate = `--- const fmTemplate = `---
date: %s date: %s
title: "%s" title: %q
slug: %s slug: %s
url: %s url: %s
--- ---

View file

@ -90,7 +90,7 @@ The `filePrepender` will prepend the return value given the full filepath to the
```go ```go
const fmTemplate = `--- const fmTemplate = `---
date: %s date: %s
title: "%s" title: %q
slug: %s slug: %s
url: %s url: %s
--- ---

View file

@ -87,7 +87,7 @@ The `filePrepender` will prepend the return value given the full filepath to the
```go ```go
const fmTemplate = `--- const fmTemplate = `---
date: %s date: %s
title: "%s" title: %q
slug: %s slug: %s
url: %s url: %s
--- ---