diff options
| author | Dave Henderson <dhenderson@gmail.com> | 2022-10-06 19:36:25 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-10-06 19:36:25 -0400 |
| commit | a55e897fd57e48dc713e4d683d2aebbc97a625fb (patch) | |
| tree | d5572b70df3903cd26d27a8000799d8d1e9f72aa | |
| parent | a796a2531311833f8203379ccef380ecabc129c7 (diff) | |
| parent | 8dd465895a41b866fb2d20401b8bab86b336fdfc (diff) | |
Merge pull request #1518 from hairyhenderson/fix-incorrect-goslice-example-1517
Fix incorrect coll.GoSlice example
| -rw-r--r-- | docs-src/content/functions/coll.yml | 3 | ||||
| -rw-r--r-- | docs/content/functions/coll.md | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/docs-src/content/functions/coll.yml b/docs-src/content/functions/coll.yml index a82e3f59..eedfd57a 100644 --- a/docs-src/content/functions/coll.yml +++ b/docs-src/content/functions/coll.yml @@ -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: | diff --git a/docs/content/functions/coll.md b/docs/content/functions/coll.md index 75446aa0..e441da9b 100644 --- a/docs/content/functions/coll.md +++ b/docs/content/functions/coll.md @@ -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` |
