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)
| 16 | // WalkType traverses the data structure recursively and calls the given function |
| 17 | // once on each attribute starting with the user type attribute. |
| 18 | func 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 |