// find the size of a document in bytes
find the size of a document in bytes
// find the size of a document in bytes
func docSize(ops interface{}) (int, error) {
	b, err := bson.Marshal(ops)
	if err != nil {
		return 0, err
	}
	return len(b), nil
}
func docSize ( ops interface { } ) ( int , error ) { b , err := bson . Marshal ( ops ) if err != nil { return 0 , err } return len ( b ) , nil }
find the size of a document in bytes
find the size of a document in bytes