Update staticcheck version and fix all warnings (#1381)

This commit is contained in:
Ta-Ching Chen
2019-11-05 18:09:12 +08:00
committed by GitHub
parent 93d4b88d84
commit b9a5588ca9
43 changed files with 122 additions and 219 deletions
+2 -3
View File
@@ -154,8 +154,7 @@ func (roundTripper RetryingRoundTripper) RoundTrip(req *http.Request) (*http.Res
roundTripper.addForwardedHostHeader(req)
// TODO: Keep? --> Needed for queries encoded in URL before they're stripped by the proxy
var originalUrl url.URL
originalUrl = *req.URL
originalUrl := *req.URL
// Iff this request needs to be recorded, we save the body
var postedBody string
@@ -245,7 +244,7 @@ func (roundTripper RetryingRoundTripper) RoundTrip(req *http.Request) (*http.Res
Body: ioutil.NopCloser(bytes.NewBufferString(errMsg)),
ContentLength: int64(len(errMsg)),
Request: req,
Header: make(http.Header, 0),
Header: make(http.Header),
}, nil
}
return nil, ferror.MakeError(http.StatusInternalServerError, err.Error())