Skip to content

Commit

Permalink
Merge pull request #92 from gofiber/go123
Browse files Browse the repository at this point in the history
chore: Add support for go1.23 and golangci-lint v1.61.0
  • Loading branch information
ReneWerner87 authored Oct 8, 2024
2 parents cefa447 + 9a54951 commit 786f636
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
version: v1.61.0
6 changes: 3 additions & 3 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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 }}
Expand Down
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -289,7 +290,6 @@ linters:
- exhaustive
# - exhaustivestruct
# - exhaustruct
- exportloopref
- forbidigo
- forcetypeassert
# - funlen
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,4 +137,4 @@ Benchmark_CalculateTimestamp/default-12 15789036 71.12 ns/op

```

See all the benchmarks under https://gofiber.github.io/utils/
See all the benchmarks under <https://gofiber.github.io/utils/>
2 changes: 1 addition & 1 deletion convert_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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))
})
}
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module github.com/gofiber/utils/v2

go 1.21
go 1.22

require (
github.com/google/uuid v1.6.0
Expand Down

1 comment on commit 786f636

@ReneWerner87
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 2.

Benchmark suite Current: 786f636 Previous: cefa447 Ratio
Benchmark_CalculateTimestamp/fiber 0.6232 ns/op 0 B/op 0 allocs/op 0.3104 ns/op 0 B/op 0 allocs/op 2.01
Benchmark_CalculateTimestamp/fiber - ns/op 0.6232 ns/op 0.3104 ns/op 2.01

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.