Skip to content
Permalink
Browse files
Merge pull request #302 from xfstart07/master
fix: decode bool error (#301)
  • Loading branch information
AlexStocks committed Dec 28, 2021
2 parents f989170 + 9079120 commit be67b60258c5afc81f4e8dabe6a12925d832dba7
Showing 1 changed file with 1 addition and 1 deletion.
@@ -471,7 +471,7 @@ func (d *Decoder) decInstance(typ reflect.Type, cls *classInfo) (interface{}, er
}
v, ok := b.(bool)
if !ok {
return nil, perrors.Wrapf(err, "value convert to bool failed, field name:%s", fieldName)
return nil, perrors.Errorf("value convert to bool failed, field name:%s", fieldName)
}

if fldRawValue.Kind() == reflect.Ptr && fldRawValue.CanSet() {

0 comments on commit be67b60

Please sign in to comment.