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

Method Attribute

expr/types.go:461–468  ·  view source on GitHub ↗

Attribute returns the attribute with the given name if any, nil otherwise.

(name string)

Source from the content-addressed store, hash-verified

459
460// Attribute returns the attribute with the given name if any, nil otherwise.
461func (o *Object) Attribute(name string) *AttributeExpr {
462 for _, nat := range *o {
463 if nat.Name == name {
464 return nat.Attribute
465 }
466 }
467 return nil
468}
469
470// Set replaces the object named attribute n if any - creates a new object by
471// appending to the slice of named attributes otherwise. The resulting object is

Callers 2

TestObjectRenameFunction · 0.95
buildDesignTypeFunction · 0.95

Calls

no outgoing calls

Tested by 1

TestObjectRenameFunction · 0.76