Skip to content

Commit f7287c5

Browse files
authored
docs: dictionary operations example was wrong (#2490)
1 parent 413574e commit f7287c5

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

website/src/docs/reference/templating.md

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ outline: deep
1111
Task's templating engine uses Go's
1212
[text/template](https://pkg.go.dev/text/template) package to interpolate values.
1313
This reference covers the main features and all available functions for creating
14-
dynamic Taskfiles. Most of the provided functions come from the
14+
dynamic Taskfiles. Most of the provided functions come from the
1515
[slim-sprig](https://sprig.taskfile.dev/) library.
1616

1717
## Basic Usage
@@ -628,9 +628,11 @@ tasks:
628628
port: 5432
629629
ssl: true
630630
cmds:
631-
- echo "Database {{.CONFIG | get "database"}}"
631+
- echo "Database {{get .CONFIG "database"}}"
632+
- echo "Database {{"database" | get .CONFIG}}"
632633
- echo "Keys {{.CONFIG | keys}}"
633-
- echo "Has SSL {{.CONFIG | hasKey "ssl"}}"
634+
- echo "Keys {{keys .CONFIG }}"
635+
- echo "Has SSL {{hasKey .CONFIG "ssl"}}"
634636
- echo "{{dict "env" "prod" "debug" false}}"
635637
```
636638

0 commit comments

Comments
 (0)