Fix broken initialization
This commit is contained in:
8
main.go
8
main.go
@@ -262,11 +262,9 @@ func Start(props *MongoStartProps) error {
|
|||||||
UseJSONStructTags: false,
|
UseJSONStructTags: false,
|
||||||
NilSliceAsEmpty: true,
|
NilSliceAsEmpty: true,
|
||||||
NilMapAsEmpty: true,
|
NilMapAsEmpty: true,
|
||||||
|
AllowTruncatingDoubles: props.AllowTruncatingDoubles,
|
||||||
}).
|
}).
|
||||||
SetRegistry(GetCustomRegistry()).
|
SetRegistry(GetCustomRegistry())
|
||||||
SetBSONOptions(&options.BSONOptions{
|
|
||||||
AllowTruncatingDoubles: props.AllowTruncatingDoubles,
|
|
||||||
})
|
|
||||||
|
|
||||||
client.DebugQuery = props.MongoDebugQuery
|
client.DebugQuery = props.MongoDebugQuery
|
||||||
if client.DebugQuery {
|
if client.DebugQuery {
|
||||||
@@ -354,7 +352,7 @@ func MapToBsonD(m map[string]any) (bson.D, error) {
|
|||||||
|
|
||||||
var d bson.D
|
var d bson.D
|
||||||
|
|
||||||
err = bson.Unmarshal(data, &d)
|
err = bson.Unmarshal(data, &d)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user