MCPcopy Create free account
hub / github.com/DataDog/jsonapi / MarshalMeta

Function MarshalMeta

marshal.go:39–43  ·  view source on GitHub ↗

MarshalMeta includes the given meta (must be a map or struct) as Document.Meta when marshaling.

(meta any)

Source from the content-addressed store, hash-verified

37
38// MarshalMeta includes the given meta (must be a map or struct) as Document.Meta when marshaling.
39func MarshalMeta(meta any) MarshalOption {
40 return func(m *Marshaler) {
41 m.meta = meta
42 }
43}
44
45// MarshalJSONAPI includes the given meta (must be a map or struct) as Document.JSONAPI.Meta when marshaling.
46// This also enables writing Document.JSONAPI.Version.

Callers 5

ExampleMarshal_metaFunction · 0.92
jsonapi_test.goFile · 0.85
TestMarshalMetaFunction · 0.85
BenchmarkMarshalFunction · 0.85

Calls

no outgoing calls

Tested by 4

ExampleMarshal_metaFunction · 0.74
TestMarshalMetaFunction · 0.68
BenchmarkMarshalFunction · 0.68