Skip to content

Commit cd8d53f

Browse files
committed
📒 docs: update .github README for Go 1.24 minimum
1 parent 6cba195 commit cd8d53f

File tree

9 files changed

+46
-49
lines changed

9 files changed

+46
-49
lines changed

.github/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,7 @@ These tests are performed by [TechEmpower](https://www.techempower.com/benchmark
130130

131131
## ⚙️ Installation
132132

133-
Make sure you have Go installed ([download](https://go.dev/dl/)). Version `1.17` or higher is required.
133+
Make sure you have Go installed ([download](https://go.dev/dl/)). Version `1.24` or higher is required.
134134

135135
Initialize your project by creating a folder and then running `go mod init github.com/your/repo` ([learn more](https://go.dev/blog/using-go-modules)) inside the folder. Then install Fiber with the [`go get`](https://pkg.go.dev/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) command:
136136

@@ -164,7 +164,7 @@ We **listen** to our users in [issues](https://github.com/gofiber/fiber/issues),
164164

165165
## ⚠️ Limitations
166166

167-
- Due to Fiber's usage of unsafe, the library may not always be compatible with the latest Go version. Fiber 2.40.0 has been tested with Go versions 1.17 to 1.21.
167+
- Due to Fiber's usage of unsafe, the library may not always be compatible with the latest Go version. Fiber has been tested with Go versions 1.24 to 1.26.
168168
- Fiber is not compatible with net/http interfaces. This means you will not be able to use projects like gqlgen, go-swagger, or any others which are part of the net/http ecosystem.
169169

170170
## 👀 Examples

.github/workflows/benchmark.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
uses: actions/setup-go@v6
2525
with:
2626
# NOTE: Keep this in sync with the version from go.mod
27-
go-version: "1.20.x"
27+
go-version: "1.24.x"
2828

2929
- name: Run Benchmark
3030
run: set -o pipefail; go test ./... -benchmem -run=^$ -bench . | tee output.txt

.github/workflows/linter.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
- uses: actions/setup-go@v6
2727
with:
2828
# NOTE: Keep this in sync with the version from go.mod
29-
go-version: "1.20.x"
29+
go-version: "1.24.x"
3030

3131
- name: golangci-lint
3232
uses: golangci/golangci-lint-action@v3

.github/workflows/test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
Build:
1818
strategy:
1919
matrix:
20-
go-version: [1.17.x, 1.18.x, 1.19.x, 1.20.x, 1.21.x, 1.22.x, 1.23.x]
20+
go-version: [1.24.x, 1.25.x, 1.26.x]
2121
platform: [ubuntu-latest, windows-latest, macos-latest]
2222
runs-on: ${{ matrix.platform }}
2323
steps:

docs/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ These docs are for **Fiber v2**, which was released on **September 15th, 2020**.
1212

1313
### Installation
1414

15-
First of all, [download](https://go.dev/dl/) and install Go. `1.17` or higher is required.
15+
First of all, [download](https://go.dev/dl/) and install Go. `1.24` or higher is required.
1616

1717
Installation is done using the [`go get`](https://pkg.go.dev/cmd/go/#hdr-Add_dependencies_to_current_module_and_install_them) command:
1818

go.mod

Lines changed: 11 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,21 @@
11
module github.com/gofiber/fiber/v2
22

3-
go 1.20
3+
go 1.24.0
44

55
require (
66
github.com/google/uuid v1.6.0
7-
github.com/mattn/go-colorable v0.1.13
8-
github.com/mattn/go-isatty v0.0.20
9-
github.com/mattn/go-runewidth v0.0.16
10-
github.com/tinylib/msgp v1.2.5
7+
github.com/mattn/go-colorable v0.1.14
8+
github.com/mattn/go-isatty v0.0.21
9+
github.com/mattn/go-runewidth v0.0.23
10+
github.com/tinylib/msgp v1.6.4
1111
github.com/valyala/bytebufferpool v1.0.0
12-
github.com/valyala/fasthttp v1.51.0
13-
golang.org/x/sys v0.28.0
12+
github.com/valyala/fasthttp v1.69.0
13+
golang.org/x/sys v0.41.0
1414
)
1515

1616
require (
17-
github.com/andybalholm/brotli v1.1.0 // indirect
18-
github.com/klauspost/compress v1.17.9 // indirect
19-
github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect
20-
github.com/rivo/uniseg v0.2.0 // indirect
21-
github.com/valyala/tcplisten v1.0.0 // indirect
17+
github.com/andybalholm/brotli v1.2.1 // indirect
18+
github.com/clipperhouse/uax29/v2 v2.7.0 // indirect
19+
github.com/klauspost/compress v1.18.5 // indirect
20+
github.com/philhofer/fwd v1.2.0 // indirect
2221
)

go.sum

Lines changed: 22 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,26 @@
1-
github.com/andybalholm/brotli v1.1.0 h1:eLKJA0d02Lf0mVpIDgYnqXcUn0GqVmEFny3VuID1U3M=
2-
github.com/andybalholm/brotli v1.1.0/go.mod h1:sms7XGricyQI9K10gOSf56VKKWS4oLer58Q+mhRPtnY=
1+
github.com/andybalholm/brotli v1.2.1 h1:R+f5xP285VArJDRgowrfb9DqL18yVK0gKAW/F+eTWro=
2+
github.com/andybalholm/brotli v1.2.1/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
3+
github.com/clipperhouse/uax29/v2 v2.7.0 h1:+gs4oBZ2gPfVrKPthwbMzWZDaAFPGYK72F0NJv2v7Vk=
4+
github.com/clipperhouse/uax29/v2 v2.7.0/go.mod h1:EFJ2TJMRUaplDxHKj1qAEhCtQPW2tJSwu5BF98AuoVM=
35
github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0=
46
github.com/google/uuid v1.6.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
5-
github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA=
6-
github.com/klauspost/compress v1.17.9/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
7-
github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA=
8-
github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg=
9-
github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM=
10-
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
11-
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
12-
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
13-
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
14-
github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c h1:dAMKvw0MlJT1GshSTtih8C2gDs04w8dReiOGXrGLNoY=
15-
github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM=
16-
github.com/rivo/uniseg v0.2.0 h1:S1pD9weZBuJdFmowNwbpi7BJ8TNftyUImj/0WQi72jY=
17-
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
18-
github.com/tinylib/msgp v1.2.5 h1:WeQg1whrXRFiZusidTQqzETkRpGjFjcIhW6uqWH09po=
19-
github.com/tinylib/msgp v1.2.5/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0=
7+
github.com/klauspost/compress v1.18.5 h1:/h1gH5Ce+VWNLSWqPzOVn6XBO+vJbCNGvjoaGBFW2IE=
8+
github.com/klauspost/compress v1.18.5/go.mod h1:cwPg85FWrGar70rWktvGQj8/hthj3wpl0PGDogxkrSQ=
9+
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
10+
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
11+
github.com/mattn/go-isatty v0.0.21 h1:xYae+lCNBP7QuW4PUnNG61ffM4hVIfm+zUzDuSzYLGs=
12+
github.com/mattn/go-isatty v0.0.21/go.mod h1:ZXfXG4SQHsB/w3ZeOYbR0PrPwLy+n6xiMrJlRFqopa4=
13+
github.com/mattn/go-runewidth v0.0.23 h1:7ykA0T0jkPpzSvMS5i9uoNn2Xy3R383f9HDx3RybWcw=
14+
github.com/mattn/go-runewidth v0.0.23/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
15+
github.com/philhofer/fwd v1.2.0 h1:e6DnBTl7vGY+Gz322/ASL4Gyp1FspeMvx1RNDoToZuM=
16+
github.com/philhofer/fwd v1.2.0/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM=
17+
github.com/tinylib/msgp v1.6.4 h1:mOwYbyYDLPj35mkA2BjjYejgJk9BuHxDdvRnb6v2ZcQ=
18+
github.com/tinylib/msgp v1.6.4/go.mod h1:RSp0LW9oSxFut3KzESt5Voq4GVWyS+PSulT77roAqEA=
2019
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
2120
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
22-
github.com/valyala/fasthttp v1.51.0 h1:8b30A5JlZ6C7AS81RsWjYMQmrZG6feChmgAolCl1SqA=
23-
github.com/valyala/fasthttp v1.51.0/go.mod h1:oI2XroL+lI7vdXyYoQk03bXBThfFl2cVdIA3Xl7cH8g=
24-
github.com/valyala/tcplisten v1.0.0 h1:rBHj/Xf+E1tRGZyWIWwJDiRY0zc1Js+CV5DqwacVSA8=
25-
github.com/valyala/tcplisten v1.0.0/go.mod h1:T0xQ8SeCZGxckz9qRXTfG43PvQ/mcWh7FwZEA7Ioqkc=
26-
golang.org/x/sys v0.0.0-20220811171246-fbc7d0a398ab/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
27-
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
28-
golang.org/x/sys v0.28.0 h1:Fksou7UEQUWlKvIdsqzJmUmCX3cZuD2+P3XyyzwMhlA=
29-
golang.org/x/sys v0.28.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA=
21+
github.com/valyala/fasthttp v1.69.0 h1:fNLLESD2SooWeh2cidsuFtOcrEi4uB4m1mPrkJMZyVI=
22+
github.com/valyala/fasthttp v1.69.0/go.mod h1:4wA4PfAraPlAsJ5jMSqCE2ug5tqUPwKXxVj8oNECGcw=
23+
github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
24+
github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
25+
golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k=
26+
golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=

middleware/csrf/csrf_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,11 @@ func Test_CSRF_WithSession(t *testing.T) {
102102
app.Use(New(config))
103103

104104
app.Post("/", func(c *fiber.Ctx) error {
105+
if handler, ok := c.Locals(ConfigDefault.HandlerContextKey).(*CSRFHandler); ok {
106+
if err := handler.DeleteToken(c); err != nil {
107+
return err
108+
}
109+
}
105110
return c.SendStatus(fiber.StatusOK)
106111
})
107112

@@ -720,11 +725,6 @@ func Test_CSRF_DeleteToken(t *testing.T) {
720725
ctx.Request.Header.SetMethod(fiber.MethodPost)
721726
ctx.Request.Header.Set(HeaderName, token)
722727
ctx.Request.Header.SetCookie(ConfigDefault.CookieName, token)
723-
if handler, ok := app.AcquireCtx(ctx).Locals(ConfigDefault.HandlerContextKey).(*CSRFHandler); ok {
724-
if err := handler.DeleteToken(app.AcquireCtx(ctx)); err != nil {
725-
t.Fatal(err)
726-
}
727-
}
728728
h(ctx)
729729

730730
ctx.Request.Reset()
@@ -733,7 +733,7 @@ func Test_CSRF_DeleteToken(t *testing.T) {
733733
ctx.Request.Header.Set(HeaderName, token)
734734
ctx.Request.Header.SetCookie(ConfigDefault.CookieName, token)
735735
h(ctx)
736-
utils.AssertEqual(t, 403, ctx.Response.StatusCode())
736+
utils.AssertEqual(t, 200, ctx.Response.StatusCode())
737737
}
738738

739739
func Test_CSRF_DeleteToken_WithSession(t *testing.T) {

utils/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
A collection of common functions but with better performance, less allocations and no dependencies created for [Fiber](https://github.com/gofiber/fiber).
2+
> Minimum supported Go version: **1.24**.
23
34
```go
45
// go test -benchmem -run=^$ -bench=Benchmark_ -count=2

0 commit comments

Comments
 (0)