expr
expr copied to clipboard
Nil safety
Lets add expr.NilSafe().
err: order is potentialy nil
| order.Amount > 500 or product.Category = xyz
|......^
And users can ckange expression to something like this:
order != nil ? order.Amount > 500 : true
Or to:
order?.Amount ?? 999 > 500
Originally posted by @antonmedv in https://github.com/antonmedv/expr/issues/433#issuecomment-1706818463