-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
None
-
Affects Version/s: None
-
Component/s: drivers
-
Labels:None
-
2
Description
page: https://docs.mongodb.com/drivers/go/
The example to connect to Atlas is not possible to get working, users receive a code error:
./goproj.go:14:2: client declared but not used
It looks like I need to read "Usage" on Github to see whats missing. Which, if I was a newer MongoDB customer this would be a pain, especially if I just wanted to test connecting or wanted quick bootstrap code like our other driver docs offer. This instruction is so barebones, _you actually have to read GitHub. _
You have to add an additional option for client in this case.
I added this:
err = client.Ping(ctx, readpref.Primary())
This satisfied the client variable use.
Because without, you get the error above. There might be other ways that are better, unclear.
Scope of changes
Impact to Other Docs
MVP (Work and Date)
Resources (Scope or Design Docs, Invision, etc.)
- mentioned in
-
Page Loading...