Lint with golangci-lint; Fix linter issues; Add Go 1.12 to CircleCI

This commit is contained in:
DarthSim
2019-04-11 20:07:09 +06:00
parent 2e6296c4d9
commit d5b7e2aa13
9 changed files with 101 additions and 15 deletions

View File

@@ -262,7 +262,7 @@ func (h *httpHandler) ServeHTTP(rctx *fasthttp.RequestCtx) {
panic(errInvalidMethod)
}
if bytes.Compare(rctx.RequestURI(), healthPath) == 0 {
if bytes.Equal(rctx.RequestURI(), healthPath) {
rctx.SetStatusCode(200)
rctx.SetBody(imgproxyIsRunningMsg)
return
@@ -316,7 +316,7 @@ func (h *httpHandler) ServeHTTP(rctx *fasthttp.RequestCtx) {
rctx.Response.Header.SetBytesV("ETag", eTag)
if bytes.Compare(eTag, rctx.Request.Header.Peek("If-None-Match")) == 0 {
if bytes.Equal(eTag, rctx.Request.Header.Peek("If-None-Match")) {
respondWithNotModified(reqID, rctx)
return
}