This commit is contained in:
Mike Schwörer 2023-05-05 18:05:58 +02:00
parent 9f6f967299
commit 1c77c2b8e8
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
2 changed files with 4 additions and 1 deletions

View File

@ -1274,7 +1274,7 @@ func TestMarshalSafeCollections(t *testing.T) {
}
for i, tt := range tests {
b, err := MarshalSafeCollections(tt.in, true, true)
b, err := MarshalSafeCollections(tt.in, true, true, nil)
if err != nil {
t.Errorf("test %d, unexpected failure: %v", i, err)
}

View File

@ -11,7 +11,10 @@ func CreateGoExtBsonRegistry() *bsoncodec.Registry {
rb := bsoncodec.NewRegistryBuilder()
rb.RegisterTypeDecoder(reflect.TypeOf(rfctime.RFC3339Time{}), rfctime.RFC3339Time{})
rb.RegisterTypeDecoder(reflect.TypeOf(&rfctime.RFC3339Time{}), rfctime.RFC3339Time{})
rb.RegisterTypeDecoder(reflect.TypeOf(rfctime.RFC3339NanoTime{}), rfctime.RFC3339NanoTime{})
rb.RegisterTypeDecoder(reflect.TypeOf(&rfctime.RFC3339NanoTime{}), rfctime.RFC3339NanoTime{})
bsoncodec.DefaultValueEncoders{}.RegisterDefaultEncoders(rb)
bsoncodec.DefaultValueDecoders{}.RegisterDefaultDecoders(rb)