I am new to mongodb-go-driver. But i am stuck.
cursor, e := collection.Find(context.Background(), bson.NewDocument(bson.EC.String(\"name\", id))) for cursor.Nex
I was getting
cannot decode objectID into an array
so i changed to
ID interface{} `bson:"_id,omitempty"`
without any issues