Skip to content

Commit c016854

Browse files
cvlucaDivjot Arora
authored andcommitted
Fix typo in objectid.go (#335)
1 parent fd24d6f commit c016854

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bson/primitive/objectid.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -126,7 +126,7 @@ func (id *ObjectID) UnmarshalJSON(b []byte) error {
126126
}
127127

128128
if len(str) != 24 {
129-
return fmt.Errorf("cannot unmarshal into an ObjectID, the length must be 12 but it is %d", len(str))
129+
return fmt.Errorf("cannot unmarshal into an ObjectID, the length must be 24 but it is %d", len(str))
130130
}
131131

132132
_, err = hex.Decode(id[:], []byte(str))

0 commit comments

Comments
 (0)