Details
-
Task
-
Resolution: Done
-
Major - P3
-
None
-
1.0.0-rc2
-
None
Description
When using the following code always getting the same error for the 'pipeline' variable that is passed in:
can only transform slices and arrays into aggregation pipelines, but got
Example code:
client, err := mongo.NewClient(options.Client().ApplyURI("mongodb://mongo1:27017,mongo2:27018,mongo3:27019/?replicaSet=my-mongo-set"))
ctx, _ := context.WithTimeout(context.Background(), 10*time.Second) err = client.Connect(ctx) |
db := DocumentationDatabase(client)
|
documentation_examples.InsertExamples(t, db)
|
|
|
// we are going to monitor the inventory collection
|
// for changes
|
coll := db.Collection("inventory") |
|
|
var pipeline interface{} // set up pipeline - |
// in new version has to be a some bsontype.Array but does not work??
|
cur, err := coll.Watch(ctx, pipeline, options.ChangeStream())
|
// above always returns with an error?
|