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

Function WalkType

codegen/walk.go:18–20  ·  view source on GitHub ↗

WalkType traverses the data structure recursively and calls the given function once on each attribute starting with the user type attribute.

(u expr.UserType, walker func(*expr.AttributeExpr) error)

Source from the content-addressed store, hash-verified

16// WalkType traverses the data structure recursively and calls the given function
17// once on each attribute starting with the user type attribute.
18func WalkType(u expr.UserType, walker func(*expr.AttributeExpr) error) error {
19 return walk(u.Attribute(), walker, map[string]bool{u.ID(): true})
20}
21
22// WalkMappedAttr iterates over the mapped attributes. It calls the given
23// function giving each attribute as it iterates. WalkMappedAttr stops if there

Callers

nothing calls this directly

Calls 3

walkFunction · 0.70
AttributeMethod · 0.65
IDMethod · 0.65

Tested by

no test coverage detected