Skip to content

Improve the cond func #5792

@bep

Description

@bep

There are two items that I want to address:

  1. Make it use the same "truth" function as if/with/not/and -- but we should think a little if this would break stuff
  2. Lazily invocation of passed funcs/methods

Basically I want to be able to do something ala:

n := cond .File .File.Filename .Name

Maybe not the best example, but imagine a nilpointer scenario etc.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions