Skip to content

Commit

Permalink
Fix incorrect coll.GoSlice example
Browse files Browse the repository at this point in the history
Signed-off-by: Dave Henderson <[email protected]>
  • Loading branch information
hairyhenderson committed Oct 6, 2022
1 parent a796a25 commit 8dd4658
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion docs-src/content/functions/coll.yml
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,8 @@ funcs:
description: the indexes to slice the item by (0 to 3 arguments)
examples:
- |
$ gomplate -i '{{ $l := coll.Slice "foo" "bar" "baz" }}{{ if has $l "bar" }}a{{else}}no{{end}} bar'
$ gomplate -i '{{ coll.GoSlice "hello world" 3 8 }}'
lo wo
- name: coll.Has
alias: has
description: |
Expand Down
3 changes: 2 additions & 1 deletion docs/content/functions/coll.md
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,8 @@ coll.GoSlice item [indexes...]
### Examples

```console
$ gomplate -i '{{ $l := coll.Slice "foo" "bar" "baz" }}{{ if has $l "bar" }}a{{else}}no{{end}} bar'
$ gomplate -i '{{ coll.GoSlice "hello world" 3 8 }}'
lo wo
```

## `coll.Has`
Expand Down

0 comments on commit 8dd4658

Please sign in to comment.