fix golint issues

This commit is contained in:
kevin
2020-10-16 10:50:43 +08:00
parent 338caf9927
commit 94645481b1
27 changed files with 73 additions and 88 deletions

View File

@@ -45,7 +45,7 @@ func decryptBody(key []byte, r *http.Request) error {
var content []byte
var err error
if r.ContentLength > 0 {
content = make([]byte, r.ContentLength, r.ContentLength)
content = make([]byte, r.ContentLength)
_, err = io.ReadFull(r.Body, content)
} else {
content, err = ioutil.ReadAll(io.LimitReader(r.Body, maxBytes))