mirror of
https://github.com/spf13/cobra
synced 2025-04-27 17:17:20 +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
|
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))
|
||||||
|
|
|
@ -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
|
||||||
---
|
---
|
||||||
|
|
|
@ -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
|
||||||
---
|
---
|
||||||
|
|
|
@ -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
|
||||||
---
|
---
|
||||||
|
|
Loading…
Add table
Reference in a new issue