MCPcopy Create free account
hub / github.com/goadesign/goa / Merge

Method Merge

expr/types.go:524–530  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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.
524func (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.
533func (*Object) IsCompatible(val any) bool {

Callers 15

ValidateMethod · 0.45
validateRequirementsMethod · 0.45
validateErrorsMethod · 0.45
validateInterceptorsMethod · 0.45
ValidateMethod · 0.45
FinalizeMethod · 0.45
ValidateMethod · 0.45
ValidateMethod · 0.45
FinalizeMethod · 0.45
validateMessageFunction · 0.45
ValidateMethod · 0.45
validateAttributesMethod · 0.45

Calls 2

DupAttFunction · 0.85
SetMethod · 0.80

Tested by

no test coverage detected