summaryrefslogtreecommitdiff
path: root/vendor/go.mongodb.org/mongo-driver/bson/raw_element.go
diff options
context:
space:
mode:
authorLibravatar dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2024-03-25 11:00:36 +0000
committerLibravatar GitHub <noreply@github.com>2024-03-25 11:00:36 +0000
commit29031d1e274360f5fe8c53e56d1b0ae71628795f (patch)
tree54149ea2a80e863349e3cd8c02e6a6d1b3fcfe3f /vendor/go.mongodb.org/mongo-driver/bson/raw_element.go
parent[chore]: Bump github.com/coreos/go-oidc/v3 from 3.9.0 to 3.10.0 (#2779) (diff)
downloadgotosocial-29031d1e274360f5fe8c53e56d1b0ae71628795f.tar.xz
[chore]: Bump github.com/gin-contrib/sessions from 0.0.5 to 1.0.0 (#2782)
Diffstat (limited to 'vendor/go.mongodb.org/mongo-driver/bson/raw_element.go')
-rw-r--r--vendor/go.mongodb.org/mongo-driver/bson/raw_element.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/vendor/go.mongodb.org/mongo-driver/bson/raw_element.go b/vendor/go.mongodb.org/mongo-driver/bson/raw_element.go
index 006f503a3..8ce13c2cc 100644
--- a/vendor/go.mongodb.org/mongo-driver/bson/raw_element.go
+++ b/vendor/go.mongodb.org/mongo-driver/bson/raw_element.go
@@ -10,10 +10,7 @@ import (
"go.mongodb.org/mongo-driver/x/bsonx/bsoncore"
)
-// RawElement represents a BSON element in byte form. This type provides a simple way to
-// transform a slice of bytes into a BSON element and extract information from it.
-//
-// RawElement is a thin wrapper around a bsoncore.Element.
+// RawElement is a raw encoded BSON document or array element.
type RawElement []byte
// Key returns the key for this element. If the element is not valid, this method returns an empty
@@ -36,7 +33,7 @@ func (re RawElement) ValueErr() (RawValue, error) {
// Validate ensures re is a valid BSON element.
func (re RawElement) Validate() error { return bsoncore.Element(re).Validate() }
-// String implements the fmt.Stringer interface. The output will be in extended JSON format.
+// String returns the BSON element encoded as Extended JSON.
func (re RawElement) String() string {
doc := bsoncore.BuildDocument(nil, re)
j, err := MarshalExtJSON(Raw(doc), true, false)