diff --git a/.github/workflows/benchmark.yml b/.github/workflows/benchmark.yml index e162c0c..7b77432 100644 --- a/.github/workflows/benchmark.yml +++ b/.github/workflows/benchmark.yml @@ -26,7 +26,7 @@ jobs: uses: actions/setup-go@v5 with: # NOTE: Keep this in sync with the version from go.mod - go-version: "1.21.x" + go-version: "1.22.x" - name: Run Benchmark run: set -o pipefail; go test ./... -benchmem -run=^$ -bench . | tee output.txt diff --git a/.github/workflows/linter.yml b/.github/workflows/linter.yml index 58e2217..7e17d8f 100644 --- a/.github/workflows/linter.yml +++ b/.github/workflows/linter.yml @@ -33,11 +33,11 @@ jobs: - uses: actions/setup-go@v5 with: # NOTE: Keep this in sync with the version from go.mod - go-version: "1.21.x" + go-version: "1.22.x" cache: false - name: golangci-lint uses: golangci/golangci-lint-action@v6 with: # NOTE: Keep this in sync with the version from .golangci.yml - version: v1.59.1 \ No newline at end of file + version: v1.61.0 \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 6892ab6..798890d 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -18,8 +18,8 @@ jobs: Build: strategy: matrix: - go-version: [1.21.x, 1.22.x] - platform: [ubuntu-latest, windows-latest, macos-latest, macos-14] + go-version: [1.22.x, 1.23.x] + platform: [ubuntu-latest, windows-latest, macos-latest, macos-13] runs-on: ${{ matrix.platform }} steps: - name: Fetch Repository @@ -40,7 +40,7 @@ jobs: run: gotestsum -f testname -- ./... -race -count=1 -coverprofile=coverage.txt -covermode=atomic -shuffle=on - name: Upload coverage reports to Codecov - if: ${{ matrix.platform == 'ubuntu-latest' && matrix.go-version == '1.22.x' }} + if: ${{ matrix.platform == 'ubuntu-latest' && matrix.go-version == '1.23.x' }} uses: codecov/codecov-action@v4.5.0 with: token: ${{ secrets.CODECOV_TOKEN }} diff --git a/.golangci.yml b/.golangci.yml index 078e097..e2dcb29 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -95,6 +95,7 @@ linters-settings: gosec: excludes: - G104 # TODO: Enable this again. Mostly provided by errcheck + - G115 config: global: # show-ignored: true # TODO: Enable this @@ -289,7 +290,6 @@ linters: - exhaustive # - exhaustivestruct # - exhaustruct - - exportloopref - forbidigo - forcetypeassert # - funlen diff --git a/Makefile b/Makefile index 4626a38..efd715d 100644 --- a/Makefile +++ b/Makefile @@ -31,7 +31,7 @@ format: ## lint: 🚨 Run lint checks .PHONY: lint lint: - go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.1 run ./... + go run github.com/golangci/golangci-lint/cmd/golangci-lint@v1.61.0 run ./... ## test: 🚦 Execute all tests .PHONY: test diff --git a/README.md b/README.md index d2c24da..8e134a7 100644 --- a/README.md +++ b/README.md @@ -137,4 +137,4 @@ Benchmark_CalculateTimestamp/default-12 15789036 71.12 ns/op ``` -See all the benchmarks under https://gofiber.github.io/utils/ \ No newline at end of file +See all the benchmarks under diff --git a/convert_test.go b/convert_test.go index c1db239..087d816 100644 --- a/convert_test.go +++ b/convert_test.go @@ -191,7 +191,7 @@ func TestCopyBytes(t *testing.T) { t.Run("nil slice", func(t *testing.T) { copied := CopyBytes(nil) require.NotNil(t, copied) - require.Empty(t, len(copied)) + require.Empty(t, copied) require.Equal(t, 0, cap(copied)) }) } diff --git a/go.mod b/go.mod index 237aa95..8e34abd 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/gofiber/utils/v2 -go 1.21 +go 1.22 require ( github.com/google/uuid v1.6.0