simplesteph / grpc-go-course

Companion Repository for my gRPC Golang course
http://bit.ly/grpc-golang-github
MIT License
473 stars 322 forks source link

Fix for error message 'document is nil' is about the filter in the Fi… #2

Closed datenarong closed 5 years ago

datenarong commented 5 years ago

The error message "document is nil" is about the filter in the Find(). Change the line

cur, err := collection.Find(context.Background(), nil) to cur, err := collection.Find(context.Background(), bson.D{‌{}})

Thank you for all your teaching. "This was the best teacher's course"

simplesteph commented 5 years ago

You're welcome, glad you enjoyed the course! Thanks for the PR, it seems MongoDB loves to break their drivers :)