From 260a13d5ad3eefd3559163b656f6977acdf72c46 Mon Sep 17 00:00:00 2001 From: Qingyang Hu Date: Thu, 18 Apr 2024 12:15:36 -0400 Subject: [PATCH] Docs updates. --- docs/common-issues.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/common-issues.md b/docs/common-issues.md index d89ffc323e..08d4d9676d 100644 --- a/docs/common-issues.md +++ b/docs/common-issues.md @@ -4,7 +4,7 @@ These are fixes or information for common issues encountered by Go Driver users. ## `WriteXXX` can only write while positioned on a Element or Value but is positioned on a TopLevel -The [`bson.Marshal`](https://pkg.go.dev/go.mongodb.org/mongo-driver/bson#Marshal) function requires a parameter that can be decoded into a BSON Document, i.e. a [`primitive.D`](https://github.com/mongodb/mongo-go-driver/blob/master/bson/bson.go#L31). Therefore the error message +The [`bson.Marshal`](https://pkg.go.dev/go.mongodb.org/mongo-driver/bson#Marshal) function requires a parameter that can be decoded into a BSON Document, i.e. a [`bson.D`](https://pkg.go.dev/go.mongodb.org/mongo-driver/bson#D). Therefore the error message > `WriteXXX` can only write while positioned on a Element or Value but is positioned on a TopLevel @@ -34,7 +34,7 @@ sort := bson.D{} ## Convert BSON Document to JSON -There are a variety of marshalers that can be used to encode a BSON document as JSON, including [MarshalExtJSON](https://pkg.go.dev/github.com/mongodb/mongo-go-driver/bson#MarshalExtJSON): +There are a variety of marshalers that can be used to encode a BSON document as JSON, including [MarshalExtJSON](https://pkg.go.dev/go.mongodb.org/mongo-driver/bson#MarshalExtJSON): ```go doc := bson.D{{"x", 1}}