all: start using "else" in comprehensions
Some of these are straightforward changes, with a few exceptions:
* gerrithub.cue was using true/false as values,
so use the conditional as the value directly
* fields using the "switch" list trick with [0] still need to use
a struct embedding the if/else comprehension,
as we cannot use a comprehension directly as a value expression.
* github.cue uses a let with a comprehension in an interpolation;
this works when using the list index trick,
but breaks when embedding in a struct, which seems like a bug.
Add a TODO and we can investigate this later.
Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
Change-Id: I30d890bcaa3b57bf6731fe67d9d1ffb099b098bc
Reviewed-on: https://cue.gerrithub.io/c/cue-lang/cue/+/1231222
TryBot-Result: CUEcueckoo <cueckoo@cuelang.org>
Unity-Result: CUE porcuepine <cue.porcuepine@gmail.com>
Reviewed-by: Marcel van Lohuizen <mpvl@gmail.com>