diff --git a/.golangci.yml b/.golangci.yml index 80ed761..069a034 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -61,7 +61,7 @@ linters: # All available linters list: 0 && code < 999 { - return uint16(code), true + return uint16(code), true //nolint:gosec } return 0, false @@ -47,7 +47,7 @@ func extractCodeFromHeaders(headers *fasthttp.RequestHeader) (uint16, bool) { // HTTP status code returned by the request if value := headers.Peek("X-Code"); len(value) > 0 && len(value) <= 3 { if code, err := strconv.ParseUint(string(value), 10, 16); err == nil && code > 0 && code < 999 { - return uint16(code), true + return uint16(code), true //nolint:gosec } } diff --git a/internal/http/server.go b/internal/http/server.go index 7edc614..13442e4 100644 --- a/internal/http/server.go +++ b/internal/http/server.go @@ -40,7 +40,7 @@ func NewServer(log *logger.Logger, readBufferSize uint) Server { server: &fasthttp.Server{ ReadTimeout: readTimeout, WriteTimeout: writeTimeout, - ReadBufferSize: int(readBufferSize), + ReadBufferSize: int(readBufferSize), //nolint:gosec DisablePreParseMultipartForm: true, NoDefaultServerHeader: true, CloseOnShutdown: true, diff --git a/internal/http/server_test.go b/internal/http/server_test.go index 1ca8dad..acfe649 100644 --- a/internal/http/server_test.go +++ b/internal/http/server_test.go @@ -392,5 +392,5 @@ func getFreeTcpPort(t *testing.T) uint16 { <-time.After(5 * time.Millisecond) } - return uint16(port) + return uint16(port) //nolint:gosec }