We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8051092 commit c35b076Copy full SHA for c35b076
mongo/single_result.go
@@ -33,6 +33,9 @@ type SingleResult struct {
33
// will be returned. If there were no returned documents, ErrNoDocuments is
34
// returned.
35
func (sr *SingleResult) Decode(v interface{}) error {
36
+ if sr.err != nil {
37
+ return sr.err
38
+ }
39
if sr.reg == nil {
40
return bson.ErrNilRegistry
41
}
0 commit comments