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

Method Key

docstore/docstore_test.go:163–170  ·  view source on GitHub ↗
(doc driver.Document)

Source from the content-addressed store, hash-verified

161}
162
163func (fakeDriverCollection) Key(doc driver.Document) (any, error) {
164 key, err := doc.GetField("key")
165 // TODO(#2589): remove this check once we check for empty key.
166 if err != nil || driver.IsEmptyValue(reflect.ValueOf(key)) {
167 return nil, err
168 }
169 return key, nil
170}
171
172func (fakeDriverCollection) RevisionField() string { return DefaultRevisionField }
173

Callers

nothing calls this directly

Calls 2

IsEmptyValueFunction · 0.92
GetFieldMethod · 0.80

Tested by

no test coverage detected