[GODRIVER-840] Docs out of date for how to connect Created: 20/Feb/19 Updated: 28/Oct/23 Resolved: 04/Mar/19 |
|
| Status: | Closed |
| Project: | Go Driver |
| Component/s: | Connections, Documentation |
| Affects Version/s: | None |
| Fix Version/s: | 1.0.0-rc2 |
| Type: | Bug | Priority: | Major - P3 |
| Reporter: | Peter Weyand | Assignee: | Isabella Siu (Inactive) |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Environment: |
Docker pulling from github.com/mongodb/mongo-go-driver/mongo (latest) |
||
| Issue Links: |
|
||||||||
| Description |
|
You guys updated how you handle connections: https://github.com/mongodb/mongo-go-driver/commit/32946b1f8b9412a6a94e68ff789575327bb257cf but the documentation here: https://godoc.org/github.com/mongodb/mongo-go-driver/mongo and here: https://github.com/mongodb/mongo-go-driver is out of date. It now needs to look something like something shown below (tested/compiles). Please update your docs or you will have a lot of confused people in the morning. I'll also update this SO: https://stackoverflow.com/questions/54778520/mongo-go-driver-failing-to-connect. Thanks! // ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) |
| Comments |
| Comment by Oz Madar [ 20/Feb/19 ] | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
cursor.Current.Decode also not working (decode is undefined for []byte). This is a fully working example:
|