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

Function removeMeta

codegen/service/service_data.go:2431–2436  ·  view source on GitHub ↗

removeMeta removes the meta attributes from the given attribute. This is needed to make sure that any field name overriding is removed when generating protobuf types (as protogen itself won't honor these overrides).

(att *expr.AttributeExpr)

Source from the content-addressed store, hash-verified

2429// needed to make sure that any field name overriding is removed when
2430// generating protobuf types (as protogen itself won't honor these overrides).
2431func removeMeta(att *expr.AttributeExpr) {
2432 _ = codegen.Walk(att, func(a *expr.AttributeExpr) error {
2433 delete(a.Meta, "struct:pkg:path")
2434 return nil
2435 })
2436}

Callers 1

buildProjectedTypeFunction · 0.70

Calls 1

WalkFunction · 0.92

Tested by

no test coverage detected