hugo icon indicating copy to clipboard operation
hugo copied to clipboard

Improve the cond func

Open bep opened this issue 5 years ago • 12 comments

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.

bep avatar Mar 25 '19 21:03 bep