You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
{{$test := "abc" -}}
{{if eq $test "abc" -}}
{{$test := printf "%s%s" $test $test}}
{{$test}}
{{end}}
{{$test}}
The text was updated successfully, but these errors were encountered:
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
The text was updated successfully, but these errors were encountered: