Skip to content

And conjunction of 2 comparisons #1167

Discussion options

You must be logged in to vote

Hi @github-reader, I've moved this to a discussion since it's more of a question than a bug report!

This is fairly straightforward, you just need to group individual operations in parentheses:

$ gomplate -i '{{ $var1 := "val1" }}{{ $var2 := "val2" }}{{ and (eq $var1 "val1") (eq $var2 "val2") }}'
true

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by hairyhenderson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #1165 on June 01, 2021 13:05.