mirror of
https://github.com/bazel-contrib/bazel-lib
synced 2024-11-26 13:30:30 +00:00
1df2becc7a
In particular this makes our bazelrc presets more compliant with client codebases, ensuring they can copy these files and not trip on their own pre-commit check
6 lines
292 B
Plaintext
6 lines
292 B
Plaintext
[
|
|
split("\n")[] # Convert lines to array
|
|
| capture("(?<key>[^\\s]+)\\s+(?<value>.*)"; "x") # capture {"key": [everything before first whitespace], "value": [remainder of line]}
|
|
]
|
|
| from_entries # Convert [{"key": "a", "value": "b"}] to map {"a": "b"}
|