updated dependencies and go
This commit is contained in:
+3
-3
@@ -87,7 +87,7 @@ func (d SecondsF64) MarshalBSONValue() (bsontype.Type, []byte, error) {
|
||||
}
|
||||
|
||||
func (d SecondsF64) DecodeValue(dc bsoncodec.DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error {
|
||||
if val.Kind() == reflect.Ptr && val.IsNil() {
|
||||
if val.Kind() == reflect.Pointer && val.IsNil() {
|
||||
if !val.CanSet() {
|
||||
return errors.New("ValueUnmarshalerDecodeValue")
|
||||
}
|
||||
@@ -99,7 +99,7 @@ func (d SecondsF64) DecodeValue(dc bsoncodec.DecodeContext, vr bsonrw.ValueReade
|
||||
return err
|
||||
}
|
||||
|
||||
if val.Kind() == reflect.Ptr && len(src) == 0 {
|
||||
if val.Kind() == reflect.Pointer && len(src) == 0 {
|
||||
val.Set(reflect.Zero(val.Type()))
|
||||
return nil
|
||||
}
|
||||
@@ -109,7 +109,7 @@ func (d SecondsF64) DecodeValue(dc bsoncodec.DecodeContext, vr bsonrw.ValueReade
|
||||
return err
|
||||
}
|
||||
|
||||
if val.Kind() == reflect.Ptr {
|
||||
if val.Kind() == reflect.Pointer {
|
||||
val.Set(reflect.ValueOf(&d))
|
||||
} else {
|
||||
val.Set(reflect.ValueOf(d))
|
||||
|
||||
Reference in New Issue
Block a user