Merge creates a new object consisting of the named attributes of o appended with duplicates of the named attributes of other. Named attributes of o that have an identical name to named attributes of other get overridden.
(other *Object)
| 522 | // with duplicates of the named attributes of other. Named attributes of o that |
| 523 | // have an identical name to named attributes of other get overridden. |
| 524 | func (o *Object) Merge(other *Object) *Object { |
| 525 | res := o |
| 526 | for _, nat := range *other { |
| 527 | res.Set(nat.Name, DupAtt(nat.Attribute)) |
| 528 | } |
| 529 | return res |
| 530 | } |
| 531 | |
| 532 | // IsCompatible returns true if o describes the (Go) type of val. |
| 533 | func (*Object) IsCompatible(val any) bool { |
no test coverage detected