[GODRIVER-888] GoDoc out of date for cursor example Created: 19/Mar/19 Updated: 28/Oct/23 Resolved: 11/Apr/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Documentation |
| Affects Version/s: | None |
| Fix Version/s: | 1.0.1 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Divjot Arora (Inactive) | Assignee: | Isabella Siu (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||
| Description |
|
https://github.com/mongodb/mongo-go-driver/blob/master/mongo/doc.go#L38 uses the DeocdeBytes method, which was removed in the cursor redesign. Change this to use Decode instead. |
| Comments |
| Comment by Githook User [ 11/Apr/19 ] |
|
Author: {'name': 'iwysiu', 'username': 'iwysiu', 'email': 'isabella.siu@10gen.com'}Message: Change-Id: Ie95f667da2814e292f68c874eef89387327174f7 |
| Comment by Isabella Siu (Inactive) [ 09/Apr/19 ] |
|
code review url: https://review.gerrithub.io/c/mongodb/mongo-go-driver/+/450649 |
| Comment by Divjot Arora (Inactive) [ 19/Mar/19 ] |
|
Possibly. Maybe we could have both with a comment for each? I'd like to see Decode included because I think the main use case of a cursor will be unmarshalling a server response into a custom struct rather than interacting directly with raw BSON. |
| Comment by Kristofer Brandow (Inactive) [ 19/Mar/19 ] |
|
For pairty with the current example, we should probably just use mongo.Cursor.Current. |