修复动态设置值失败问题

This commit is contained in:
2023-01-01 17:31:25 +08:00
parent 6e8dff9f9c
commit cbde9c3707
4 changed files with 133 additions and 3 deletions

View File

@ -72,7 +72,7 @@ func (f *filter) Deal() error {
if formatVal, err = f.getValue(rule.DataType, sourceVal); nil != err {
return fmt.Errorf("%s = %v can not convert to %s : %s", rule.SourcePath, sourceResult.Value(), rule.DataType, err.Error())
}
if _, err = sjson.Set(f.formatResult, rule.MapPath, formatVal); nil != err {
if f.formatResult, err = sjson.Set(f.formatResult, rule.MapPath, formatVal); nil != err {
return err
}
}