-
I have the following struct that serves as an environment input:
I need to write an expression that evaluates the
The best solution I've come up with so far is:
Is this the most idiomatic way to handle this case in Expr? |
Beta Was this translation helpful? Give feedback.
Answered by
antonmedv
Sep 18, 2025
Replies: 1 comment
-
This is the bug in expr compilation as it can't dereference inside "if". Workaround is to "trigger" dereferencing: v.Enabled == nil ? 'default' : ( v.Enabled == true ? 'enabled' : 'disabled' ) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
antonmedv
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the bug in expr compilation as it can't dereference inside "if".
I created a issue to track all deref problems: #836
Workaround is to "trigger" dereferencing: