Details
-
Task
-
Resolution: Works as Designed
-
Major - P3
-
None
-
None
-
None
-
None
Description
Find.().Decode() fails with the below error
error was: cannot transform type []interface {} to a BSON Document: WriteArray can only write a Array while positioned on a Element or Value but is positioned on a TopLevel |
|
I tried something like below:
login = model.LoginModel{}
|
err = mongo.Collection.Find(bson.M{"name": MAXLOGINCOUNT}).Decode(&loginCount) |
|
Does it allow a struct as a value for decode ? I used find.().One in global sign that used to work just fine .