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

Function unmarshal

http/codegen/service_data.go:2967–2969  ·  view source on GitHub ↗

unmarshal initializes a data structure defined by target type from a data structure defined by source type. The attributes in the source data structure are pointers and the attributes in the target data structure that have default values are non-pointers. Fields in target type are initialized with t

(source, target *expr.AttributeExpr, sourceVar string, sourceCtx, targetCtx *codegen.AttributeContext)

Source from the content-addressed store, hash-verified

2965//
2966// sourceCtx, targetCtx are the source and target attribute contexts
2967func unmarshal(source, target *expr.AttributeExpr, sourceVar string, sourceCtx, targetCtx *codegen.AttributeContext) (string, []*codegen.TransformFunctionData, error) {
2968 return codegen.GoTransform(source, target, sourceVar, "v", sourceCtx, targetCtx, "unmarshal", true)
2969}
2970
2971// marshal initializes a data structure defined by target type from a data
2972// structure defined by source type. The fields in the source and target

Callers 3

buildPayloadDataMethod · 0.85
buildResponsesMethod · 0.85
buildErrorsDataMethod · 0.85

Calls 1

GoTransformFunction · 0.92

Tested by

no test coverage detected