Skip to content

Commit

Permalink
Delete incorrect comment
Browse files Browse the repository at this point in the history
  • Loading branch information
ptodev committed Oct 31, 2024
1 parent 0ef415c commit 955fc04
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
3 changes: 0 additions & 3 deletions docs/sources/reference/stdlib/targets.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@ It takes three inputs:
* The first two inputs are a of type `list(map(string))`. The keys of the map are strings.
The value for each key could have any Alloy type such as a string, integer, map, or a capsule.
* The third input is an array containing strings. The strings are the keys whose value has to match for maps to be joined.


If the set of keys don't identify a map uniquely, the resulting output may contain more maps than the total sum of maps from both input arrays.

### Examples

Expand Down
6 changes: 6 additions & 0 deletions syntax/vm/vm_stdlib_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,12 @@ func TestVM_Stdlib(t *testing.T) {
`targets.merge([{"a" = "a1", "b" = "b1"}, {"a" = "a1", "b" = "b1"}], [{"a" = "a1", "c" = "c1"}], ["a"])`,
[]map[string]interface{}{{"a": "a1", "b": "b1", "c": "c1"}, {"a": "a1", "b": "b1", "c": "c1"}},
},
{
// Non-unique merge criteria.
"targets.merge",
`targets.merge([{"pod" = "a", "lbl" = "q"}, {"pod" = "b", "lbl" = "q"}], [{"pod" = "c", "lbl" = "q"}, {"pod" = "d", "lbl" = "q"}], ["lbl"])`,
[]map[string]interface{}{{"lbl": "q", "pod": "c"}, {"lbl": "q", "pod": "d"}, {"lbl": "q", "pod": "c"}, {"lbl": "q", "pod": "d"}},
},
{
// Basic case. Integer and string values.
"targets.merge",
Expand Down

0 comments on commit 955fc04

Please sign in to comment.