File tree Expand file tree Collapse file tree 1 file changed +1
-17
lines changed
Expand file tree Collapse file tree 1 file changed +1
-17
lines changed Original file line number Diff line number Diff line change 11package bson
22
33import (
4- "bytes"
54 "encoding/hex"
6- "fmt"
75
86 "go.mongodb.org/mongo-driver/bson"
97 "go.mongodb.org/mongo-driver/bson/primitive"
@@ -54,21 +52,7 @@ type M = primitive.M
5452type A = primitive.A
5553
5654// ObjectID primitive.ObjectID
57- type ObjectID [12 ]byte
58-
59- // Hex returns the hex encoding of the ObjectID as a string.
60- func (id ObjectID ) Hex () string {
61- return hex .EncodeToString (id [:])
62- }
63-
64- func (id ObjectID ) String () string {
65- return fmt .Sprintf ("ObjectID(%q)" , id .Hex ())
66- }
67-
68- // IsZero returns true if id is the empty ObjectID.
69- func (id ObjectID ) IsZero () bool {
70- return bytes .Equal (id [:], primitive .NilObjectID [:])
71- }
55+ type ObjectID = primitive.ObjectID
7256
7357// NewObjectID primitive.NewObjectID()
7458var NewObjectID = primitive .NewObjectID ()
You can’t perform that action at this time.
0 commit comments