1
0
mirror of https://github.com/go-task/task.git synced 2025-05-13 22:16:31 +02:00

docs: update variables example so that it doesn't error

This commit is contained in:
Pete Davison 2025-04-27 22:26:59 +00:00
parent bd8ccb8d03
commit 20c1ffe098
No known key found for this signature in database

View File

@ -1116,14 +1116,14 @@ tasks:
MAP: MAP:
map: {A: 1, B: 2, C: 3} map: {A: 1, B: 2, C: 3}
cmds: cmds:
- 'echo {{.STRING}}' # Hello, World! - 'echo {{.STRING}}' # Hello, World!
- 'echo {{.BOOL}}' # true - 'echo {{.BOOL}}' # true
- 'echo {{.INT}}' # 42 - 'echo {{.INT}}' # 42
- 'echo {{.FLOAT}}' # 3.14 - 'echo {{.FLOAT}}' # 3.14
- 'echo {{.ARRAY}}' # [1 2 3] - 'echo {{.ARRAY}}' # [1 2 3]
- 'echo {{.ARRAY.0}}' # 1 - 'echo {{index .ARRAY 0}}' # 1
- 'echo {{.MAP}}' # map[A:1 B:2 C:3] - 'echo {{.MAP}}' # map[A:1 B:2 C:3]
- 'echo {{.MAP.A}}' # 1 - 'echo {{.MAP.A}}' # 1
``` ```
Variables can be set in many places in a Taskfile. When executing Variables can be set in many places in a Taskfile. When executing