Update a record in mongodb in golang

preview_player
Показать описание
Welcome to a youtube channel dedicated to programming and coding related tutorials. We talk about tech, write code, discuss about cloud and devops. That’s what we do all day, all year. We roll out a lot of series and videos on our channel.

All the learning resources such as code files, documentations, articles and community discussions are available on our website:

You can find our discord link, github link etc on the above website.

Рекомендации по теме
Комментарии
Автор

There is always a good difference in views from introduction video to ending video. This shows it is easy to start but requires patience and consistency to finish it. Great Videos Hitesh. This playlist was very helpful for me.

harshraj
Автор

D is a slice and M is a map.
Note that a D should not be constructed with duplicate key names, as that can cause undefined server behavior.
Example:
bson.D{{"foo", "bar"}, {"hello", "world"}, {"pi", 3.14159}}
bson.M{"foo": "bar", "hello": "world", "pi": 3.14159}

princesarvaiya
Автор

Hi, thanks for the tutorial. I've been trying to implement this using another field that is not the id. I keep getting 0 for modified count. I need to use a different field for the filter like (filter := bson.M{"reference":ref})

_waire