Skip to content

Commit e659c66

Browse files
committed
clear lint warnings
1 parent ae6aace commit e659c66

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

bson.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ func (id *ObjectId) UnmarshalBSON(data []byte) error {
135135
// BSON document if the error is nil.
136136
func (id ObjectId) MarshalBSONValue() (bsontype.Type, []byte, error) {
137137
oid := bsonprim.ObjectID(id)
138-
return bsontype.ObjectID, oid[:], nil
138+
return bson.TypeObjectID, oid[:], nil
139139
}
140140

141141
// UnmarshalBSONValue is an interface implemented by types that can unmarshal a

time.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -247,15 +247,15 @@ func (t DateTime) MarshalBSONValue() (bsontype.Type, []byte, error) {
247247
buf := make([]byte, 8)
248248
binary.LittleEndian.PutUint64(buf, uint64(i64))
249249

250-
return bsontype.DateTime, buf, nil
250+
return bson.TypeDateTime, buf, nil
251251
}
252252

253253
// UnmarshalBSONValue is an interface implemented by types that can unmarshal a
254254
// BSON value representation of themselves. The BSON bytes and type can be
255255
// assumed to be valid. UnmarshalBSONValue must copy the BSON value bytes if it
256256
// wishes to retain the data after returning.
257257
func (t *DateTime) UnmarshalBSONValue(tpe bsontype.Type, data []byte) error {
258-
if tpe == bsontype.Null {
258+
if tpe == bson.TypeNull {
259259
*t = DateTime{}
260260
return nil
261261
}

0 commit comments

Comments
 (0)