multiple conditions in if statement Go templates
You need to use function and
, like:
{{ if and .condition1 .condition2 }}
<!-- SHOW SOMETHING -->
{{ end }}
Here's an working example: https://play.golang.org/p/g_itE5ggCM
{{ if and (eq .var1 "8") (eq .var2 "9") (eq .var "10") }}
<!-- SHOW SOMETHING -->
{{ end }}
The parenthesis make the trick