MCPcopy Create free account
hub / github.com/google/go-cloud / Decode

Method Decode

docstore/driver/document.go:179–184  ·  view source on GitHub ↗

Decode decodes the document using the given Decoder.

(dec Decoder)

Source from the content-addressed store, hash-verified

177
178// Decode decodes the document using the given Decoder.
179func (d Document) Decode(dec Decoder) error {
180 if d.m != nil {
181 return decodeMap(reflect.ValueOf(d.m), dec)
182 }
183 return decodeStruct(d.s, dec)
184}
185
186// HasField returns whether or not d has a certain field.
187func (d Document) HasField(field string) bool {

Callers 6

decodeDocFunction · 0.45
loadDocsFunction · 0.45
decodeDocFunction · 0.45
nextMapMethod · 0.45
bulkFindMethod · 0.45
decodeDocFunction · 0.45

Calls 2

decodeMapFunction · 0.85
decodeStructFunction · 0.85

Tested by

no test coverage detected