add golangci feature to guarantee codes quality (#2229)

This commit is contained in:
houseme
2022-11-01 20:12:21 +08:00
committed by GitHub
parent 8e0e87877a
commit 1793bf0863
255 changed files with 1123 additions and 690 deletions

View File

@ -11,9 +11,9 @@ import (
"strings"
"github.com/clbanning/mxj/v2"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/encoding/gcharset"
"github.com/gogf/gf/v2/errors/gerror"
"github.com/gogf/gf/v2/text/gregex"
)
@ -77,9 +77,9 @@ func ToJson(content []byte) ([]byte, error) {
}
mv, err := mxj.NewMapXml(res)
if err == nil {
err = gerror.Wrapf(err, `mxj.NewMapXml failed`)
return mv.Json()
}
err = gerror.Wrap(err, `mxj.NewMapXml failed`)
return nil, err
}