mirror of
https://github.com/spf13/cobra
synced 2025-04-27 09:07:19 +00:00
all: refactor to use %q instead of "%s"
This commit is contained in:
parent
66b215ba18
commit
e587892673
4 changed files with 4 additions and 4 deletions
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
---
|
||||
|
|
|
@ -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
|
||||
---
|
||||
|
|
|
@ -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
|
||||
---
|
||||
|
|
Loading…
Add table
Reference in a new issue