From 4892822343d099c0ed262fb3ef111b703a5c3991 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Wed, 21 Aug 2024 12:31:28 +0400 Subject: [PATCH] chore(deps): update dependency golangci/golangci-lint to v1.60.2 (#305) * chore(deps): update dependency golangci/golangci-lint to v1.60.2 * linter fixes --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Paramtamtam <7326800+tarampampam@users.noreply.github.com> --- .golangci.yml | 2 +- Dockerfile | 2 +- internal/cli/build/command.go | 4 ++-- internal/cli/perftest/command.go | 6 +++--- internal/cli/serve/command.go | 4 ++-- internal/cli/serve/command_test.go | 2 +- internal/http/handlers/error_page/code.go | 4 ++-- internal/http/server.go | 2 +- internal/http/server_test.go | 2 +- 9 files changed, 14 insertions(+), 14 deletions(-) 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 }