ListCollectionNames cannot be used

XMLWordPrintableJSON

    • 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)
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      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
            Reporter:
            Andrew Lee
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: