添加golangci-lint配置

This commit is contained in:
GoEdgeLab
2023-08-08 18:36:24 +08:00
parent 7c08239ea1
commit a61426e8f6
5 changed files with 85 additions and 4 deletions

View File

@@ -201,7 +201,7 @@ func (this *CustomHTTPProvider) post(params maps.Map) (respData []byte, err erro
defer func() {
_ = resp.Body.Close()
}()
if resp.StatusCode != 200 {
if resp.StatusCode != http.StatusOK {
return nil, errors.New("status should be 200, but got '" + strconv.Itoa(resp.StatusCode) + "'")
}
return io.ReadAll(resp.Body)