cue version
)?Not using cue
as an executable but rather via the Go API.
Yes
Using the Go API I would like to be able to unify a set of values while ignoring some fields that are only transiently generated but useful to retain for logging purposes.
For example if I have
{
sum: "a31c34da"
important1: "value1"
config: {
part1: "value2"
}
} unify ignoring sum {
sum: "ae20a82c"
important2: "value3"
}
I would like to be able to resolve this to something like
{
sum: "a31c34da"|"ae20a82c"
config: {
part1: "value2"
}
important1: "value1"
important2: "value3"
}
or similar with the sum field omitted.
It looks to me from the documentation that something like this is supported by cue.Value.UnifyAccept
, but how to use it to do this is unclear and I have not been able to get it to work in my experiments. Can the documentation be clarified for this?
Clear explanation of how to use UnifyAccept
.
Limited explanation. I was able to find one use of it in the tree and no tests, so it is difficult to know how to use it, or even whether my interpretation that it is usable for this is correct.