You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This commit reverses the dependency between the bson and bsoncodec
package. This allows the bson package to contain the Marshal and
Unmarshal family of functions and the Encoder and Decoder types. This
allows future types in the bson package to handle the empty interface.
The default encoders and decoders are split across two packages, because
the bsoncodec package can only provide encoders and decoders for
non-bson package types. The empty interface decoder is defined twice: a
partial version in bsoncdec and a complete version in the bson package.
Almost all users should use a Registry created from both sets of
encoders and decoders.
The bsoncodec package was split into the bsonrw and bsoncodec packages.
The new bsonrw package contains the ValueReader and ValueWriter
definitions and implementations. A new bsonrwtest package was created
with the previously used llValueReaderWriter type that is useful for
unit testing a ValueReader or ValueWriter implementation. This allows
users outside of the bsoncodec and bsonrw packages to use this type with
their own ValueReader and ValueWriter implementations.
The llbson package is renamed bsoncore and moved out of internal. This
will allow other users to directly use this low level bson package.
Eventually the entire BSON library will use bsoncore to handle reading
and writing BSON from and to bytes. This package replaces the elements
package, which will be removed in a future commit.
GODRIVER-592
Change-Id: I1e2dabc83cae9705fc062a6b763e0d2b91cde3ef
0 commit comments