And conjunction of 2 comparisons #1167
Answered
by
hairyhenderson
github-reader
asked this question in
Q&A
-
Hello I want to do this:
I am getting an error message: How can I solve this problem with gomplate? References to go language are not helpful because we do not use it. |
Beta Was this translation helpful? Give feedback.
Answered by
hairyhenderson
Jun 1, 2021
Replies: 1 comment
-
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 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
hairyhenderson
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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: