Skip to content

Commit

Permalink
Merge pull request #906 from hairyhenderson/fix-docs-template-typos-901
Browse files Browse the repository at this point in the history
Fix typos in strings examples
  • Loading branch information
Dave Henderson authored and GitHub committed Jul 21, 2020
2 parents 7254b97 + 341e92c commit d6c2932
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 8 deletions.
12 changes: 8 additions & 4 deletions docs-src/content/functions/strings.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,8 @@ funcs:
description: the input string
examples:
- |
$ gomplate -i '{{range ("Bart,Lisa,Maggie" | strings.Split ",") }}Hello, {{.}}{{end}}'
$ gomplate -i '{{range ("Bart,Lisa,Maggie" | strings.Split ",") }}Hello, {{.}}
{{end}}'
Hello, Bart
Hello, Lisa
Hello, Maggie
Expand All @@ -171,7 +172,8 @@ funcs:
description: the input string
examples:
- |
$ gomplate -i '{{ range ("foo:bar:baz" | strings.SplitN ":" 2) }}{{.}}{{end}}'
$ gomplate -i '{{ range ("foo:bar:baz" | strings.SplitN ":" 2) }}{{.}}
{{end}}'
foo
bar:baz
- name: strings.Quote
Expand Down Expand Up @@ -615,7 +617,8 @@ funcs:
description: the string sequence to split
examples:
- |
$ gomplate -i '{{range split "Bart,Lisa,Maggie" ","}}Hello, {{.}}{{end}}'
$ gomplate -i '{{range split "Bart,Lisa,Maggie" ","}}Hello, {{.}}
{{end}}'
Hello, Bart
Hello, Lisa
Hello, Maggie
Expand All @@ -638,7 +641,8 @@ funcs:
description: the maximum number of substrings to return
examples:
- |
$ gomplate -i '{{ range splitN "foo:bar:baz" ":" 2 }}{{.}}{{end}}'
$ gomplate -i '{{ range splitN "foo:bar:baz" ":" 2 }}{{.}}
{{end}}'
foo
bar:baz
- name: trim
Expand Down
12 changes: 8 additions & 4 deletions docs/content/functions/strings.md
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,8 @@ input | strings.Split separator
### Examples

```console
$ gomplate -i '{{range ("Bart,Lisa,Maggie" | strings.Split ",") }}Hello, {{.}}{{end}}'
$ gomplate -i '{{range ("Bart,Lisa,Maggie" | strings.Split ",") }}Hello, {{.}}
{{end}}'
Hello, Bart
Hello, Lisa
Hello, Maggie
Expand Down Expand Up @@ -261,7 +262,8 @@ input | strings.SplitN separator count
### Examples

```console
$ gomplate -i '{{ range ("foo:bar:baz" | strings.SplitN ":" 2) }}{{.}}{{end}}'
$ gomplate -i '{{ range ("foo:bar:baz" | strings.SplitN ":" 2) }}{{.}}
{{end}}'
foo
bar:baz
```
Expand Down Expand Up @@ -998,7 +1000,8 @@ split input separator
### Examples

```console
$ gomplate -i '{{range split "Bart,Lisa,Maggie" ","}}Hello, {{.}}{{end}}'
$ gomplate -i '{{range split "Bart,Lisa,Maggie" ","}}Hello, {{.}}
{{end}}'
Hello, Bart
Hello, Lisa
Hello, Maggie
Expand Down Expand Up @@ -1028,7 +1031,8 @@ splitN input separator count
### Examples

```console
$ gomplate -i '{{ range splitN "foo:bar:baz" ":" 2 }}{{.}}{{end}}'
$ gomplate -i '{{ range splitN "foo:bar:baz" ":" 2 }}{{.}}
{{end}}'
foo
bar:baz
```
Expand Down

0 comments on commit d6c2932

Please sign in to comment.