utils

package
v0.0.0-...-4471eec Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 23, 2015 License: MIT Imports: 2 Imported by: 0

Documentation

Index

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL