Skip to content

Nil safety #434

Open
Open
@antonmedv

Description

@antonmedv

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 #433 (comment)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions