Obtain ObjectIdHex value from mgo query
问题 I'm still new to go and while I see multiple questions on SO similar to this, I'm unable to reproduce the output some OP's had requested (this answer looking the closest). I'm doing something fairly simple, I'm hitting a users collection in mongo and all I want to do is get the _id value back as a string. I'm going to eventually push these _id 's up to NSQ but that's the brunt of my task. var users []bson.M err = sess.DB("db_name").C("users").Find(bson.M{}).All(&users) if err != nil { os.Exit