kelseyhightower/confd

A confd variable issue

jikui opened this issue · 0 comments

jikui commented

With the following tmpl codes, I intended to have the {{$test}} variable is "abcabc" at the line 6. While the result is "abc" which means the changes in {{$if}} block doesn't take effect. How could I achieve this target? What's more, the value of $test is abcabc at line 4.

Thanks

  1. {{$test := "abc" -}}
  2. {{if eq $test "abc" -}}
  3. {{$test := printf "%s%s" $test $test}}
  4. {{$test}}
  5. {{end}}
  6. {{$test}}