Skip to content
This repository was archived by the owner on Mar 24, 2026. It is now read-only.

Commit 544898b

Browse files
authored
frameworks/go: add support for fiber v3 (#10662)
* frameworks/go: add support for fiber v3 * go/fiber-v2: update go version to 1.25
1 parent 57cf690 commit 544898b

19 files changed

Lines changed: 825 additions & 93 deletions
Lines changed: 99 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,53 +1,103 @@
11
{
22
"framework": "fiber",
3-
"tests": [{
4-
"default": {
5-
"json_url": "/json",
6-
"db_url": "/db",
7-
"query_url": "/queries?q=",
8-
"fortune_url": "/fortunes",
9-
"cached_query_url": "/cached-worlds?q=",
10-
"update_url": "/update?q=",
11-
"plaintext_url": "/plaintext",
12-
"port": 8080,
13-
"approach": "Realistic",
14-
"classification": "Platform",
15-
"database": "Postgres",
16-
"framework": "fiber",
17-
"language": "Go",
18-
"flavor": "None",
19-
"orm": "Raw",
20-
"platform": "None",
21-
"webserver": "None",
22-
"os": "Linux",
23-
"database_os": "Linux",
24-
"display_name": "Fiber",
25-
"notes": "",
26-
"versus": "go"
27-
},
28-
"prefork": {
29-
"json_url": "/json",
30-
"db_url": "/db",
31-
"query_url": "/queries?q=",
32-
"fortune_url": "/fortunes",
33-
"cached_query_url": "/cached-worlds?q=",
34-
"update_url": "/update?q=",
35-
"plaintext_url": "/plaintext",
36-
"port": 8080,
37-
"approach": "Realistic",
38-
"classification": "Platform",
39-
"database": "Postgres",
40-
"framework": "fiber",
41-
"language": "Go",
42-
"flavor": "None",
43-
"orm": "Raw",
44-
"platform": "None",
45-
"webserver": "None",
46-
"os": "Linux",
47-
"database_os": "Linux",
48-
"display_name": "Fiber prefork",
49-
"notes": "",
50-
"versus": "go"
3+
"tests": [
4+
{
5+
"default": {
6+
"json_url": "/json",
7+
"db_url": "/db",
8+
"query_url": "/queries?q=",
9+
"fortune_url": "/fortunes",
10+
"cached_query_url": "/cached-worlds?q=",
11+
"update_url": "/update?q=",
12+
"plaintext_url": "/plaintext",
13+
"port": 8080,
14+
"approach": "Realistic",
15+
"classification": "Platform",
16+
"database": "Postgres",
17+
"framework": "fiber-v3",
18+
"language": "Go",
19+
"flavor": "None",
20+
"orm": "Raw",
21+
"platform": "None",
22+
"webserver": "None",
23+
"os": "Linux",
24+
"database_os": "Linux",
25+
"display_name": "Fiber v3",
26+
"notes": "",
27+
"versus": "go"
28+
},
29+
"v2": {
30+
"json_url": "/json",
31+
"db_url": "/db",
32+
"query_url": "/queries?q=",
33+
"fortune_url": "/fortunes",
34+
"cached_query_url": "/cached-worlds?q=",
35+
"update_url": "/update?q=",
36+
"plaintext_url": "/plaintext",
37+
"port": 8080,
38+
"approach": "Realistic",
39+
"classification": "Platform",
40+
"database": "Postgres",
41+
"framework": "fiber-v2",
42+
"language": "Go",
43+
"flavor": "None",
44+
"orm": "Raw",
45+
"platform": "None",
46+
"webserver": "None",
47+
"os": "Linux",
48+
"database_os": "Linux",
49+
"display_name": "Fiber v2",
50+
"notes": "",
51+
"versus": "go"
52+
},
53+
"v3-prefork": {
54+
"json_url": "/json",
55+
"db_url": "/db",
56+
"query_url": "/queries?q=",
57+
"fortune_url": "/fortunes",
58+
"cached_query_url": "/cached-worlds?q=",
59+
"update_url": "/update?q=",
60+
"plaintext_url": "/plaintext",
61+
"port": 8080,
62+
"approach": "Realistic",
63+
"classification": "Platform",
64+
"database": "Postgres",
65+
"framework": "fiber-v3-prefork",
66+
"language": "Go",
67+
"flavor": "None",
68+
"orm": "Raw",
69+
"platform": "None",
70+
"webserver": "None",
71+
"os": "Linux",
72+
"database_os": "Linux",
73+
"display_name": "Fiber v3 prefork",
74+
"notes": "",
75+
"versus": "go"
76+
},
77+
"v2-prefork": {
78+
"json_url": "/json",
79+
"db_url": "/db",
80+
"query_url": "/queries?q=",
81+
"fortune_url": "/fortunes",
82+
"cached_query_url": "/cached-worlds?q=",
83+
"update_url": "/update?q=",
84+
"plaintext_url": "/plaintext",
85+
"port": 8080,
86+
"approach": "Realistic",
87+
"classification": "Platform",
88+
"database": "Postgres",
89+
"framework": "fiber-v2-prefork",
90+
"language": "Go",
91+
"flavor": "None",
92+
"orm": "Raw",
93+
"platform": "None",
94+
"webserver": "None",
95+
"os": "Linux",
96+
"database_os": "Linux",
97+
"display_name": "Fiber v2 prefork",
98+
"notes": "",
99+
"versus": "go"
100+
}
51101
}
52-
}]
102+
]
53103
}

frameworks/Go/fiber/fiber-prefork.dockerfile renamed to frameworks/Go/fiber/fiber-v2-prefork.dockerfile

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
1-
FROM golang:1.24.2-alpine as builder
1+
FROM golang:1.25.6-alpine as builder
22

33
WORKDIR /fiber
44

5-
COPY ./src /fiber
5+
COPY ./fiber-v2 /fiber
66

77
RUN go mod download && \
8-
go generate -x ./templates && \
8+
go install github.com/valyala/quicktemplate/qtc@latest && \
9+
qtc && \
910
GOAMD64=v3 go build -ldflags="-s -w" -o app .
1011

1112
FROM alpine:latest
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
FROM golang:1.25.6-alpine as builder
2+
3+
WORKDIR /fiber
4+
5+
COPY ./fiber-v2 /fiber
6+
7+
RUN go mod download && \
8+
go install github.com/valyala/quicktemplate/qtc@latest && \
9+
qtc && \
10+
GOAMD64=v3 go build -ldflags="-s -w" -o app .
11+
12+
FROM alpine:latest
13+
14+
WORKDIR /fiber
15+
16+
COPY --from=builder /fiber/app .
17+
18+
EXPOSE 8080
19+
20+
CMD ./app
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,28 @@
1-
module fiber/app
1+
module fiber-v2/app
22

3-
go 1.24.0
4-
5-
toolchain go1.24.1
3+
go 1.25.0
64

75
require (
86
github.com/goccy/go-json v0.10.5
97
github.com/gofiber/fiber/v2 v2.52.11
10-
github.com/jackc/pgx/v5 v5.7.4
8+
github.com/jackc/pgx/v5 v5.8.0
119
github.com/valyala/quicktemplate v1.8.0
1210
)
1311

1412
require (
15-
github.com/andybalholm/brotli v1.1.1 // indirect
13+
github.com/andybalholm/brotli v1.2.0 // indirect
14+
github.com/clipperhouse/uax29/v2 v2.6.0 // indirect
1615
github.com/google/uuid v1.6.0 // indirect
1716
github.com/jackc/pgpassfile v1.0.0 // indirect
1817
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 // indirect
1918
github.com/jackc/puddle/v2 v2.2.2 // indirect
20-
github.com/klauspost/compress v1.18.0 // indirect
19+
github.com/klauspost/compress v1.18.4 // indirect
2120
github.com/mattn/go-colorable v0.1.14 // indirect
2221
github.com/mattn/go-isatty v0.0.20 // indirect
23-
github.com/mattn/go-runewidth v0.0.16 // indirect
24-
github.com/rivo/uniseg v0.4.7 // indirect
22+
github.com/mattn/go-runewidth v0.0.19 // indirect
2523
github.com/valyala/bytebufferpool v1.0.0 // indirect
26-
github.com/valyala/fasthttp v1.60.0 // indirect
27-
golang.org/x/crypto v0.45.0 // indirect
28-
golang.org/x/sync v0.18.0 // indirect
29-
golang.org/x/sys v0.38.0 // indirect
30-
golang.org/x/text v0.31.0 // indirect
24+
github.com/valyala/fasthttp v1.69.0 // indirect
25+
golang.org/x/sync v0.19.0 // indirect
26+
golang.org/x/sys v0.41.0 // indirect
27+
golang.org/x/text v0.33.0 // indirect
3128
)
Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
1-
github.com/andybalholm/brotli v1.1.1 h1:PR2pgnyFznKEugtsUo0xLdDop5SKXd5Qf5ysW+7XdTA=
2-
github.com/andybalholm/brotli v1.1.1/go.mod h1:05ib4cKhjx3OQYUY22hTVd34Bc8upXjOLL2rKwwZBoA=
1+
github.com/andybalholm/brotli v1.2.0 h1:ukwgCxwYrmACq68yiUqwIWnGY0cTPox/M94sVwToPjQ=
2+
github.com/andybalholm/brotli v1.2.0/go.mod h1:rzTDkvFWvIrjDXZHkuS16NPggd91W3kUSvPlQ1pLaKY=
3+
github.com/clipperhouse/uax29/v2 v2.6.0 h1:z0cDbUV+aPASdFb2/ndFnS9ts/WNXgTNNGFoKXuhpos=
4+
github.com/clipperhouse/uax29/v2 v2.6.0/go.mod h1:Wn1g7MK6OoeDT0vL+Q0SQLDz/KpfsVRgg6W7ihQeh4g=
35
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
46
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
57
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
@@ -13,45 +15,40 @@ github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsI
1315
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
1416
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761 h1:iCEnooe7UlwOQYpKFhBabPMi4aNAfoODPEFNiAnClxo=
1517
github.com/jackc/pgservicefile v0.0.0-20240606120523-5a60cdf6a761/go.mod h1:5TJZWKEWniPve33vlWYSoGYefn3gLQRzjfDlhSJ9ZKM=
16-
github.com/jackc/pgx/v5 v5.7.4 h1:9wKznZrhWa2QiHL+NjTSPP6yjl3451BX3imWDnokYlg=
17-
github.com/jackc/pgx/v5 v5.7.4/go.mod h1:ncY89UGWxg82EykZUwSpUKEfccBGGYq1xjrOpsbsfGQ=
18+
github.com/jackc/pgx/v5 v5.8.0 h1:TYPDoleBBme0xGSAX3/+NujXXtpZn9HBONkQC7IEZSo=
19+
github.com/jackc/pgx/v5 v5.8.0/go.mod h1:QVeDInX2m9VyzvNeiCJVjCkNFqzsNb43204HshNSZKw=
1820
github.com/jackc/puddle/v2 v2.2.2 h1:PR8nw+E/1w0GLuRFSmiioY6UooMp6KJv0/61nB7icHo=
1921
github.com/jackc/puddle/v2 v2.2.2/go.mod h1:vriiEXHvEE654aYKXXjOvZM39qJ0q+azkZFrfEOc3H4=
20-
github.com/klauspost/compress v1.18.0 h1:c/Cqfb0r+Yi+JtIEq73FWXVkRonBlf0CRNYc8Zttxdo=
21-
github.com/klauspost/compress v1.18.0/go.mod h1:2Pp+KzxcywXVXMr50+X0Q/Lsb43OQHYWRCY2AiWywWQ=
22+
github.com/klauspost/compress v1.18.4 h1:RPhnKRAQ4Fh8zU2FY/6ZFDwTVTxgJ/EMydqSTzE9a2c=
23+
github.com/klauspost/compress v1.18.4/go.mod h1:R0h/fSBs8DE4ENlcrlib3PsXS61voFxhIs2DeRhCvJ4=
2224
github.com/mattn/go-colorable v0.1.14 h1:9A9LHSqF/7dyVVX6g0U9cwm9pG3kP9gSzcuIPHPsaIE=
2325
github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8=
2426
github.com/mattn/go-isatty v0.0.20 h1:xfD0iDuEKnDkl03q4limB+vH+GxLEtL/jb4xVJSWWEY=
2527
github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D7dTCTo3Y=
26-
github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc=
27-
github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w=
28+
github.com/mattn/go-runewidth v0.0.19 h1:v++JhqYnZuu5jSKrk9RbgF5v4CGUjqRfBm05byFGLdw=
29+
github.com/mattn/go-runewidth v0.0.19/go.mod h1:XBkDxAl56ILZc9knddidhrOlY5R/pDhgLpndooCuJAs=
2830
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
2931
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
30-
github.com/rivo/uniseg v0.2.0/go.mod h1:J6wj4VEh+S6ZtnVlnTBMWIodfgj8LQOQFoIToxlJtxc=
31-
github.com/rivo/uniseg v0.4.7 h1:WUdvkW8uEhrYfLC4ZzdpI2ztxP1I582+49Oc5Mq64VQ=
32-
github.com/rivo/uniseg v0.4.7/go.mod h1:FN3SvrM+Zdj16jyLfmOkMNblXMcoc8DfTHruCPUcx88=
3332
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
3433
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
3534
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
36-
github.com/stretchr/testify v1.8.1 h1:w7B6lhMri9wdJUVmEZPGGhZzrYTPvgJArz7wNPgYKsk=
37-
github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4=
35+
github.com/stretchr/testify v1.11.1 h1:7s2iGBzp5EwR7/aIZr8ao5+dra3wiQyKjjFuvgVKu7U=
36+
github.com/stretchr/testify v1.11.1/go.mod h1:wZwfW3scLgRK+23gO65QZefKpKQRnfz6sD981Nm4B6U=
3837
github.com/valyala/bytebufferpool v1.0.0 h1:GqA5TC/0021Y/b9FG4Oi9Mr3q7XYx6KllzawFIhcdPw=
3938
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
40-
github.com/valyala/fasthttp v1.60.0 h1:kBRYS0lOhVJ6V+bYN8PqAHELKHtXqwq9zNMLKx1MBsw=
41-
github.com/valyala/fasthttp v1.60.0/go.mod h1:iY4kDgV3Gc6EqhRZ8icqcmlG6bqhcDXfuHgTO4FXCvc=
39+
github.com/valyala/fasthttp v1.69.0 h1:fNLLESD2SooWeh2cidsuFtOcrEi4uB4m1mPrkJMZyVI=
40+
github.com/valyala/fasthttp v1.69.0/go.mod h1:4wA4PfAraPlAsJ5jMSqCE2ug5tqUPwKXxVj8oNECGcw=
4241
github.com/valyala/quicktemplate v1.8.0 h1:zU0tjbIqTRgKQzFY1L42zq0qR3eh4WoQQdIdqCysW5k=
4342
github.com/valyala/quicktemplate v1.8.0/go.mod h1:qIqW8/igXt8fdrUln5kOSb+KWMaJ4Y8QUsfd1k6L2jM=
4443
github.com/xyproto/randomstring v1.0.5 h1:YtlWPoRdgMu3NZtP45drfy1GKoojuR7hmRcnhZqKjWU=
4544
github.com/xyproto/randomstring v1.0.5/go.mod h1:rgmS5DeNXLivK7YprL0pY+lTuhNQW3iGxZ18UQApw/E=
46-
golang.org/x/crypto v0.45.0 h1:jMBrvKuj23MTlT0bQEOBcAE0mjg8mK9RXFhRH6nyF3Q=
47-
golang.org/x/crypto v0.45.0/go.mod h1:XTGrrkGJve7CYK7J8PEww4aY7gM3qMCElcJQ8n8JdX4=
48-
golang.org/x/sync v0.18.0 h1:kr88TuHDroi+UVf+0hZnirlk8o8T+4MrK6mr60WkH/I=
49-
golang.org/x/sync v0.18.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
45+
golang.org/x/sync v0.19.0 h1:vV+1eWNmZ5geRlYjzm2adRgW2/mcpevXNg50YZtPCE4=
46+
golang.org/x/sync v0.19.0/go.mod h1:9KTHXmSnoGruLpwFjVSX0lNNA75CykiMECbovNTZqGI=
5047
golang.org/x/sys v0.6.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
51-
golang.org/x/sys v0.38.0 h1:3yZWxaJjBmCWXqhN1qh02AkOnCQ1poK6oF+a7xWL6Gc=
52-
golang.org/x/sys v0.38.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
53-
golang.org/x/text v0.31.0 h1:aC8ghyu4JhP8VojJ2lEHBnochRno1sgL6nEi9WGFGMM=
54-
golang.org/x/text v0.31.0/go.mod h1:tKRAlv61yKIjGGHX/4tP1LTbc13YSec1pxVEWXzfoeM=
48+
golang.org/x/sys v0.41.0 h1:Ivj+2Cp/ylzLiEU89QhWblYnOE9zerudt9Ftecq2C6k=
49+
golang.org/x/sys v0.41.0/go.mod h1:OgkHotnGiDImocRcuBABYBEXf8A9a87e/uXjp9XT3ks=
50+
golang.org/x/text v0.33.0 h1:B3njUFyqtHDUI5jMn1YIr5B0IE2U0qck04r6d4KPAxE=
51+
golang.org/x/text v0.33.0/go.mod h1:LuMebE6+rBincTi9+xWTY8TztLzKHc/9C1uBCG27+q8=
5552
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
5653
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
5754
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
"github.com/goccy/go-json"
1414
"github.com/gofiber/fiber/v2"
1515

16-
"fiber/app/templates"
16+
"fiber-v2/app/templates"
1717

1818
"github.com/jackc/pgx/v5"
1919
"github.com/jackc/pgx/v5/pgxpool"
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)