Closed bryceschober closed 4 years ago
Hi @bryceschober,
That's by design. You could do something like this instead:
version: 3
vars:
DATE:
sh: date +%Y%m%d
tasks:
print-test:
vars:
LABEL: >-
{{if .LABEL}}{{.LABEL}}{{else}}latest-{{.DATE}}{{end}}
silent: true
cmds:
- echo "label '{{.LABEL}}'"
How would I expand struct fields in a
default
string value? In the context ofgo-task
, I was trying something like:Which results in behavior like this:
So the usage of
{{default}}
is working, but it's not expanding in the default string value.