updated dependencies and go
This commit is contained in:
@@ -54,7 +54,7 @@ func (e ErrorCategory) MarshalBSONValue() (bsontype.Type, []byte, error) {
|
||||
}
|
||||
|
||||
func (e ErrorCategory) 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")
|
||||
}
|
||||
@@ -66,7 +66,7 @@ func (e ErrorCategory) DecodeValue(dc bsoncodec.DecodeContext, vr bsonrw.ValueRe
|
||||
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
|
||||
}
|
||||
@@ -76,7 +76,7 @@ func (e ErrorCategory) DecodeValue(dc bsoncodec.DecodeContext, vr bsonrw.ValueRe
|
||||
return err
|
||||
}
|
||||
|
||||
if val.Kind() == reflect.Ptr {
|
||||
if val.Kind() == reflect.Pointer {
|
||||
val.Set(reflect.ValueOf(&e))
|
||||
} else {
|
||||
val.Set(reflect.ValueOf(e))
|
||||
|
||||
Reference in New Issue
Block a user