Skip to content

Fix formatting issues in mgocompat docs #491

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 25, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 22 additions & 23 deletions bson/mgocompat/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,38 +16,37 @@
//
// The driver uses different types than mgo's bson. The differences are:
//
// 1) The driver's bson.RawValue is equivalent to mgo's bson.Raw, but uses Value instead
// of Data and uses Type, which is a bsontype.Type object that wraps a byte, instead of
// bson.Raw's Kind, a byte.
// 1) The driver's bson.RawValue is equivalent to mgo's bson.Raw, but uses Value instead of Data and uses Type,
// which is a bsontype.Type object that wraps a byte, instead of bson.Raw's Kind, a byte.
//
// 3) The driver uses primitive.ObjectID, which is a [12]byte instead of mgo's
// bson.ObjectId, a string. Due to this, the zero value marshals and unmarshals differently
// for Extended JSON, with the driver marshaling as `{"ID":"000000000000000000000000"}` and
// mgo as `{"Id":""}`. The driver will not unmarshal {"ID":""} to a primitive.ObjectID.
// 2) The driver uses primitive.ObjectID, which is a [12]byte instead of mgo's
// bson.ObjectId, a string. Due to this, the zero value marshals and unmarshals differently
// for Extended JSON, with the driver marshaling as {"ID":"000000000000000000000000"} and
// mgo as {"Id":""}. The driver can unmarshal {"ID":""} to a primitive.ObjectID.
//
// 4) The driver's primitive.Symbol is equivalent to mgo's bson.Symbol.
// 3) The driver's primitive.Symbol is equivalent to mgo's bson.Symbol.
//
// 5) The driver uses primitive.Timestamp instead of mgo's bson.MongoTimestamp. While
// MongoTimestamp is an int64, primitive.Timestamp stores the time and counter as two separate
// uint32 values, T and I respectively.
// 4) The driver uses primitive.Timestamp instead of mgo's bson.MongoTimestamp. While
// MongoTimestamp is an int64, primitive.Timestamp stores the time and counter as two separate
// uint32 values, T and I respectively.
//
// 6) The driver uses primitive.MinKey and primitive.MaxKey, which are struct{}, instead
// of mgo's bson.MinKey and bson.MaxKey, which are int64.
// 5) The driver uses primitive.MinKey and primitive.MaxKey, which are struct{}, instead
// of mgo's bson.MinKey and bson.MaxKey, which are int64.
//
// 7) The driver's primitive.Undefined is equivalent to mgo's bson.Undefined.
// 6) The driver's primitive.Undefined is equivalent to mgo's bson.Undefined.
//
// 8) The driver's primitive.Binary is equivalent to mgo's bson.Binary, with variables named Subtype
// and Data instead of Kind and Data.
// 7) The driver's primitive.Binary is equivalent to mgo's bson.Binary, with variables named Subtype
// and Data instead of Kind and Data.
//
// 9) The driver's primitive.Regex is equivalent to mgo's bson.RegEx.
// 8) The driver's primitive.Regex is equivalent to mgo's bson.RegEx.
//
// 10) The driver's primitive.JavaScript is equivalent to mgo's bson.JavaScript with no
// scope and primitive.CodeWithScope is equivalent to mgo's bson.JavaScript with scope.
// 9) The driver's primitive.JavaScript is equivalent to mgo's bson.JavaScript with no
// scope and primitive.CodeWithScope is equivalent to mgo's bson.JavaScript with scope.
//
// 11) The driver's primitive.DBPointer is equivalent to mgo's bson.DBPointer, with variables
// named DB and Pointer instead of Namespace and Id.
// 10) The driver's primitive.DBPointer is equivalent to mgo's bson.DBPointer, with variables
// named DB and Pointer instead of Namespace and Id.
//
// 12) When implementing the Setter interface, mgocompat.ErrSetZero is equivalent to mgo's
// bson.ErrSetZero.
// 11) When implementing the Setter interface, mgocompat.ErrSetZero is equivalent to mgo's
// bson.ErrSetZero.
//
package mgocompat