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

Function unmarshalJSONRef

http/codegen/openapi/v3/ref.go:133–142  ·  view source on GitHub ↗
(data []byte, ref *string, v any)

Source from the content-addressed store, hash-verified

131}
132
133func unmarshalJSONRef(data []byte, ref *string, v any) error {
134 refs := &refs{}
135 if err := json.Unmarshal(data, refs); err == nil {
136 if len(refs.Ref) > 0 {
137 *ref = refs.Ref
138 return nil
139 }
140 }
141 return json.Unmarshal(data, v)
142}
143
144func marshalYAMLRef(ref string, v any) (any, error) {
145 if len(ref) > 0 {

Callers 8

UnmarshalJSONMethod · 0.85
UnmarshalJSONMethod · 0.85
UnmarshalJSONMethod · 0.85
UnmarshalJSONMethod · 0.85
UnmarshalJSONMethod · 0.85
UnmarshalJSONMethod · 0.85
UnmarshalJSONMethod · 0.85
UnmarshalJSONMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected