Skip to content

Commit

Permalink
Change asserting to converting
Browse files Browse the repository at this point in the history
  • Loading branch information
prestonvasquez committed Nov 12, 2024
1 parent 853b126 commit 6a3befe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/migration-2.0.md
Original file line number Diff line number Diff line change
Expand Up @@ -1183,7 +1183,7 @@ A new `RawArray` type has been added to the `bson` package as a primitive type t

### ValueMarshaler

The `MarshalBSONValue` method of the `ValueMarshaler` interface is only required to return a byte type value representing the BSON type to avoid importing the `bsontype` package. Comparison can be achieved by type asserting with `bson.Type`. For example:
The `MarshalBSONValue` method of the `ValueMarshaler` interface is only required to return a byte type value representing the BSON type to avoid importing the `bsontype` package. Comparison can be achieved by type converting with `bson.Type`. For example:

```go
btype, _, _ := m.MarshalBSONValue()
Expand Down

0 comments on commit 6a3befe

Please sign in to comment.