-
Type: Bug
-
Resolution: Works as Designed
-
Priority: Major - P3
-
None
-
Affects Version/s: 1.0.2
-
Component/s: Core API
-
None
-
Environment:macOS: 10.14.5
go: go1.12.5 darwin/amd64
Using go modules (not dep)
I'm not sure if this is something I am doing wrong, but I seem to be unable to use ListCollectionNames (which is should work according to https://godoc.org/go.mongodb.org/mongo-driver/mongo#Database.ListCollectionNames)
Specifically, my code looks like this:
{{ client, err := mongo.Connect(context.Background(), options.Client().ApplyURI("mongodb://127.0.0.1:27017")) client, err := mongo.Connect(context.Background(), options.Client().ApplyURI("mongodb://127.0.0.1:27017")) db := client.Database("thedb") names, _ := db.ListCollectionNames(context.Background(), bson.D{})}}