mirror of
https://github.com/bazelbuild/bazel-skylib
synced 2024-11-27 05:43:25 +00:00
1.9 KiB
Executable file
1.9 KiB
Executable file
selects.with_or
selects.with_or(input_dict, no_match_error)
Drop-in replacement for select()
that supports ORed keys.
Parameters
input_dict |
required.
The same dictionary `select()` takes, except keys may take either the usual form `"//foo:config1"` or `("//foo:config1", "//foo:config2", ...)` to signify `//foo:config1` OR `//foo:config2` OR `...`. |
no_match_error |
optional. default is ""
Optional custom error to report if no condition matches.
|
selects.with_or_dict
selects.with_or_dict(input_dict)
Variation of with_or
that returns the dict of the select()
.
Unlike select()
, the contents of the dict can be inspected by Starlark
macros.
Parameters
input_dict |
required.
Same as `with_or`. |