Skip to content

Commit f54e631

Browse files
author
Divjot Arora
authored
Fix formatting issues in mgocompat docs (#491)
1 parent e51b43f commit f54e631

File tree

1 file changed

+22
-23
lines changed

1 file changed

+22
-23
lines changed

bson/mgocompat/doc.go

Lines changed: 22 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -16,38 +16,37 @@
1616
//
1717
// The driver uses different types than mgo's bson. The differences are:
1818
//
19-
// 1) The driver's bson.RawValue is equivalent to mgo's bson.Raw, but uses Value instead
20-
// of Data and uses Type, which is a bsontype.Type object that wraps a byte, instead of
21-
// bson.Raw's Kind, a byte.
19+
// 1) The driver's bson.RawValue is equivalent to mgo's bson.Raw, but uses Value instead of Data and uses Type,
20+
// which is a bsontype.Type object that wraps a byte, instead of bson.Raw's Kind, a byte.
2221
//
23-
// 3) The driver uses primitive.ObjectID, which is a [12]byte instead of mgo's
24-
// bson.ObjectId, a string. Due to this, the zero value marshals and unmarshals differently
25-
// for Extended JSON, with the driver marshaling as `{"ID":"000000000000000000000000"}` and
26-
// mgo as `{"Id":""}`. The driver will not unmarshal {"ID":""} to a primitive.ObjectID.
22+
// 2) The driver uses primitive.ObjectID, which is a [12]byte instead of mgo's
23+
// bson.ObjectId, a string. Due to this, the zero value marshals and unmarshals differently
24+
// for Extended JSON, with the driver marshaling as {"ID":"000000000000000000000000"} and
25+
// mgo as {"Id":""}. The driver can unmarshal {"ID":""} to a primitive.ObjectID.
2726
//
28-
// 4) The driver's primitive.Symbol is equivalent to mgo's bson.Symbol.
27+
// 3) The driver's primitive.Symbol is equivalent to mgo's bson.Symbol.
2928
//
30-
// 5) The driver uses primitive.Timestamp instead of mgo's bson.MongoTimestamp. While
31-
// MongoTimestamp is an int64, primitive.Timestamp stores the time and counter as two separate
32-
// uint32 values, T and I respectively.
29+
// 4) The driver uses primitive.Timestamp instead of mgo's bson.MongoTimestamp. While
30+
// MongoTimestamp is an int64, primitive.Timestamp stores the time and counter as two separate
31+
// uint32 values, T and I respectively.
3332
//
34-
// 6) The driver uses primitive.MinKey and primitive.MaxKey, which are struct{}, instead
35-
// of mgo's bson.MinKey and bson.MaxKey, which are int64.
33+
// 5) The driver uses primitive.MinKey and primitive.MaxKey, which are struct{}, instead
34+
// of mgo's bson.MinKey and bson.MaxKey, which are int64.
3635
//
37-
// 7) The driver's primitive.Undefined is equivalent to mgo's bson.Undefined.
36+
// 6) The driver's primitive.Undefined is equivalent to mgo's bson.Undefined.
3837
//
39-
// 8) The driver's primitive.Binary is equivalent to mgo's bson.Binary, with variables named Subtype
40-
// and Data instead of Kind and Data.
38+
// 7) The driver's primitive.Binary is equivalent to mgo's bson.Binary, with variables named Subtype
39+
// and Data instead of Kind and Data.
4140
//
42-
// 9) The driver's primitive.Regex is equivalent to mgo's bson.RegEx.
41+
// 8) The driver's primitive.Regex is equivalent to mgo's bson.RegEx.
4342
//
44-
// 10) The driver's primitive.JavaScript is equivalent to mgo's bson.JavaScript with no
45-
// scope and primitive.CodeWithScope is equivalent to mgo's bson.JavaScript with scope.
43+
// 9) The driver's primitive.JavaScript is equivalent to mgo's bson.JavaScript with no
44+
// scope and primitive.CodeWithScope is equivalent to mgo's bson.JavaScript with scope.
4645
//
47-
// 11) The driver's primitive.DBPointer is equivalent to mgo's bson.DBPointer, with variables
48-
// named DB and Pointer instead of Namespace and Id.
46+
// 10) The driver's primitive.DBPointer is equivalent to mgo's bson.DBPointer, with variables
47+
// named DB and Pointer instead of Namespace and Id.
4948
//
50-
// 12) When implementing the Setter interface, mgocompat.ErrSetZero is equivalent to mgo's
51-
// bson.ErrSetZero.
49+
// 11) When implementing the Setter interface, mgocompat.ErrSetZero is equivalent to mgo's
50+
// bson.ErrSetZero.
5251
//
5352
package mgocompat

0 commit comments

Comments
 (0)