I am trying to add 20 points to two fields inside document with findAndModify through Go (mgo for mongo)
like
change := mgo.Change{
Update: bson.M{ "$inc": bson.M{ "score": 20 } }, // here I need to add 20 to hist_score also
ReturnNew: true,
}
collection.Find( bson.M{ "_id": id } ).Apply( change, &doc )
How to through one apply update two fields score and hist_score ?