[GODRIVER-696] SingleResult should use bson.DefaultRegistry when Registry is nil Created: 13/Dec/18  Updated: 28/Oct/23  Resolved: 19/Dec/18

Status: Closed
Project: Go Driver
Component/s: CRUD
Affects Version/s: 0.1.0
Fix Version/s: 0.2.0

Type: Bug Priority: Major - P3
Reporter: Kristofer Brandow (Inactive) Assignee: Kristofer Brandow (Inactive)
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

The SingleResult type will currently panic when it isn't provided with a Registry. Fix this by using the DefaultRegistry when the registry is nil.



 Comments   
Comment by Githook User [ 19/Dec/18 ]

Author:

{'username': 'skriptble', 'email': 'kris@mongodb.com', 'name': 'Kris Brandow'}

Message: Make SingleResult return an error on nil registry

If the registry for SingleResult is nil, return bson.ErrNilRegistry.

GODRIVER-696

Change-Id: Iea3de38c9cc2c4a348b6614f760685aadc842157
Branch: master
https://github.com/mongodb/mongo-go-driver/commit/a776a302f4f424f1a12ca8cd7ea3e63a9d812794

Comment by Kristofer Brandow (Inactive) [ 18/Dec/18 ]

Code Review: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/437735.

Generated at Thu Feb 08 08:34:45 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.