Uploaded image for project: 'Go Driver'
  1. Go Driver
  2. GODRIVER-1113

ListCollectionNames cannot be used

    • Type: Icon: Bug Bug
    • Resolution: Works as Designed
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 1.0.2
    • Component/s: Core API
    • Labels:
      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{})}}

            Assignee:
            Unassigned Unassigned
            Reporter:
            ajlee1000 Andrew Lee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: