I have a GoLang code:
c.Find(selectQuery).All(&results)
if err == mgo.ErrNotFound {
// error handling
}
selectQuery
value is not important here.
I never get error ErrNotFound
. Even if the query doesn't match any results I don't get ErrNotFound
. I get variable result
with empty attributes. How should I change the code to handle ErrNotFound
case?