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

Method nextMap

docstore/mongodocstore/query.go:138–150  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

136}
137
138func (it *docIterator) nextMap(ctx context.Context) (map[string]interface{}, error) {
139 if !it.cursor.Next(ctx) {
140 if it.cursor.Err() != nil {
141 return nil, it.cursor.Err()
142 }
143 return nil, io.EOF
144 }
145 var m map[string]interface{}
146 if err := it.cursor.Decode(&m); err != nil {
147 return nil, fmt.Errorf("cursor.Decode: %v", err)
148 }
149 return m, nil
150}
151
152func (it *docIterator) Stop() {
153 // Ignore error on Close.

Callers 1

NextMethod · 0.95

Calls 3

ErrMethod · 0.80
NextMethod · 0.65
DecodeMethod · 0.45

Tested by

no test coverage detected