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

Function isStringMetaType

http/codegen/service_data.go:3011–3017  ·  view source on GitHub ↗

isStringMetaType returns true if the attribute has a struct:field:type meta whose underlying DSL type is string, indicating the custom type should implement encoding.TextUnmarshaler for HTTP parameter conversion.

(c *expr.AttributeExpr)

Source from the content-addressed store, hash-verified

3009// whose underlying DSL type is string, indicating the custom type should
3010// implement encoding.TextUnmarshaler for HTTP parameter conversion.
3011func isStringMetaType(c *expr.AttributeExpr) bool {
3012 typeName, _ := codegen.GetMetaType(c)
3013 if typeName == "" {
3014 return false
3015 }
3016 return c.Type.Kind() == expr.StringKind
3017}
3018
3019// addMarshalTags adds JSON, XML and Form tags to all inline object attributes recursively.
3020func addMarshalTags(att *expr.AttributeExpr, seen map[string]struct{}) {

Callers 2

extractPathParamsMethod · 0.85
extractQueryParamsMethod · 0.85

Calls 2

GetMetaTypeFunction · 0.92
KindMethod · 0.65

Tested by

no test coverage detected