Documentation ¶ Index ¶ Variables func IsObjectId(id string) bool func ObjectId(id interface{}) bson.ObjectId Constants ¶ This section is empty. Variables ¶ View Source var ( ErrInvalidObjectId = errors.New("Invalid ObjectID format") ) Functions ¶ func IsObjectId ¶ func IsObjectId(id string) bool func ObjectId ¶ func ObjectId(id interface{}) bson.ObjectId Function will take types string or bson.ObjectId represented by a type interface{} and returns a type bson.ObjectId. Will panic if wrong type is passed. Will also panic if the string is not a valid representation of an ObjectId Types ¶ This section is empty. Source Files ¶ View all Source files objectid.go Click to show internal directories. Click to hide internal directories.