From be0f046eea4957c6eca508c2a0b4fdff1e039ac6 Mon Sep 17 00:00:00 2001 From: Preston Vasquez Date: Fri, 15 Nov 2024 12:58:58 -0700 Subject: [PATCH] Update docs/migration-2.0.md Co-authored-by: Matt Dale <9760375+matthewdale@users.noreply.github.com> --- docs/migration-2.0.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/migration-2.0.md b/docs/migration-2.0.md index f3fa4cd157..c0c6f3a20b 100644 --- a/docs/migration-2.0.md +++ b/docs/migration-2.0.md @@ -1193,7 +1193,7 @@ fmt.Println("type of data is an array: %v", bson.Type(btype) == bson.TypeArray) ### ValueUnmarshaler -The `UnmarshalBSONValue` method of the `ValueUnmarshaler` interface is only required to take a byte type argument representing the BSON type to avoid importing the Go driver package. For example: +The `UnmarshalBSONValue` method of the [ValueUnmarshaler](https://pkg.go.dev/go.mongodb.org/mongo-driver/v2/bson#ValueUnmarshaler) interface now accepts a `byte` value representing the [BSON type](https://pkg.go.dev/go.mongodb.org/mongo-driver/v2/bson#Type) for the first argument. That allows packages to implement `ValueUnmarshaler` without having to import the `bson` package. For example: ```go if err := m.UnmarshalBSONValue(bson.TypeEmbeddedDocument, bytes); err != nil {