Skip to content

Commit

Permalink
GODRIVER-3206 Deprecate RawValue.UnmarshalWithContext (#1687)
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewdale authored Jun 27, 2024
1 parent ba4f865 commit 90146e7
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bson/raw_value.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@ func (rv RawValue) UnmarshalWithRegistry(r *bsoncodec.Registry, val interface{})
return dec.DecodeValue(bsoncodec.DecodeContext{Registry: r}, vr, rval)
}

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

0 comments on commit 90146e7

Please sign in to comment.