Skip to content

Commit 90146e7

Browse files
authored
GODRIVER-3206 Deprecate RawValue.UnmarshalWithContext (#1687)
1 parent ba4f865 commit 90146e7

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bson/raw_value.go

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,12 @@ func (rv RawValue) UnmarshalWithRegistry(r *bsoncodec.Registry, val interface{})
8888
return dec.DecodeValue(bsoncodec.DecodeContext{Registry: r}, vr, rval)
8989
}
9090

91-
// UnmarshalWithContext performs the same unmarshalling as Unmarshal but uses the provided DecodeContext
92-
// instead of the one attached or the default registry.
91+
// UnmarshalWithContext performs the same unmarshalling as Unmarshal but uses
92+
// the provided DecodeContext instead of the one attached or the default
93+
// registry.
94+
//
95+
// Deprecated: Use [RawValue.UnmarshalWithRegistry] with a custom registry to customize
96+
// unmarshal behavior instead.
9397
func (rv RawValue) UnmarshalWithContext(dc *bsoncodec.DecodeContext, val interface{}) error {
9498
if dc == nil {
9599
return ErrNilContext

0 commit comments

Comments
 (0)