Skip to content

Conversation

kotahorii
Copy link

Summary

This PR fixes issue #2859 where QueryParser incorrectly parses slices in embedded structs. The problem was that comma-separated values in query parameters for slice fields within embedded structs were not being split correctly.

Root Cause

The issue was in the buildFieldInfo() function in binder/mapping.go. The function wasn't properly handling embedded/anonymous struct fields when building the field information cache used by equalFieldType() for determining if comma-splitting should be applied.

Changes Made

  • Modified buildFieldInfo() function: Added recursive processing of embedded/anonymous struct fields using f.Anonymous check
  • Proper field merging: Embedded struct field names are now correctly merged into the parent struct's field map
  • Comprehensive test coverage: Added tests covering various embedded struct scenarios including nested embedding

Test Cases Added

  1. Basic embedded struct slice parsing: Tests comma-separated values in embedded struct slice fields
  2. Issue 🐛 [Bug]: Incorrect Parsing of Slice by QueryParser() with Embedded Structs #2859 reproduction test: Directly reproduces the exact scenario mentioned in the issue
  3. Nested embedded structs: Tests multiple levels of embedded structs
  4. Mixed parameter handling: Tests combination of comma-separated and multiple parameter instances

Before vs After

Before this fix:

type Embedded struct {
    Tags []string `query:"tags"`
}
type Request struct {
    Name string `query:"name"`
    Embedded
}
// Query: ?name=john&tags=tag1,tag2,tag3
// Result: Tags = ["tag1,tag2,tag3"] ❌ (not split)

After this fix:

// Same structs and query
// Result: Tags = ["tag1", "tag2", "tag3"] ✅ (properly split)

Validation

  • All existing tests pass
  • New tests specifically validate the fix
  • No breaking changes to existing functionality

Closes #2859

gaby and others added 30 commits February 11, 2025 11:33
…lang.org/x/crypto-0.33.0

build(deps): bump golang.org/x/crypto from 0.32.0 to 0.33.0
…dules group (gofiber#3293)

build(deps): bump golang.org/x/net in the go_modules group

Bumps the go_modules group with 1 update: [golang.org/x/net](https://github.com/golang/net).


Updates `golang.org/x/net` from 0.31.0 to 0.33.0
- [Commits](golang/net@v0.31.0...v0.33.0)

---
updated-dependencies:
- dependency-name: golang.org/x/net
  dependency-type: indirect
  dependency-group: go_modules
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
…#3315)

* 🩹 Fix: genericParseType parsing large uint leads to overflow

* ♻️ Refactor: use strconv.FormatUint instead of fmt.Sprintf
docs: Update adapter middleware documentation
* feat: Optimize ShutdownWithContext method in app.go

- Reorder mutex lock acquisition to the start of the function
- Early return if server is not running
- Use defer for executing shutdown hooks
- Simplify nil check for hooks
- Remove TODO comment

This commit improves the readability, robustness, and execution order
of the shutdown process. It ensures consistent state throughout the
shutdown and guarantees hook execution even in error cases.

* feat: Enhance ShutdownWithContext test for improved reliability

- Add shutdown hook verification
- Implement better synchronization with channels
- Improve error handling and assertions
- Adjust timeouts for more consistent results
- Add server state check after shutdown attempt
- Include comments explaining expected behavior

This commit improves the comprehensiveness and reliability of the
ShutdownWithContext test, ensuring proper verification of shutdown
hooks, timeout behavior, and server state during long-running requests.

* 📚 Doc: update the docs to explain shutdown & hook execution order

* 🩹 Fix: Possible Data Race on shutdownHookCalled Variable

* 🩹 Fix: Remove the default Case

* 🩹 Fix: Import sync/atomic

* 🩹 Fix: golangci-lint problem

* 🎨 Style: add block in api.md

* 🩹 Fix: go mod tidy

* feat: Optimize ShutdownWithContext method in app.go

- Reorder mutex lock acquisition to the start of the function
- Early return if server is not running
- Use defer for executing shutdown hooks
- Simplify nil check for hooks
- Remove TODO comment

This commit improves the readability, robustness, and execution order
of the shutdown process. It ensures consistent state throughout the
shutdown and guarantees hook execution even in error cases.

* feat: Enhance ShutdownWithContext test for improved reliability

- Add shutdown hook verification
- Implement better synchronization with channels
- Improve error handling and assertions
- Adjust timeouts for more consistent results
- Add server state check after shutdown attempt
- Include comments explaining expected behavior

This commit improves the comprehensiveness and reliability of the
ShutdownWithContext test, ensuring proper verification of shutdown
hooks, timeout behavior, and server state during long-running requests.

* 📚 Doc: update the docs to explain shutdown & hook execution order

* 🩹 Fix: Possible Data Race on shutdownHookCalled Variable

* 🩹 Fix: Remove the default Case

* 🩹 Fix: Import sync/atomic

* 🩹 Fix: golangci-lint problem

* 🎨 Style: add block in api.md

* 🩹 Fix: go mod tidy

* ♻️ Refactor: replaced OnShutdown  by OnPreShutdown and OnPostShutdown

* ♻️ Refactor: streamline post-shutdown hook execution in graceful shutdown process

* 🚨 Test: add test for gracefulShutdown

* 🔥 Feature: Using executeOnPreShutdownHooks and executeOnPostShutdownHooks Instead of OnShutdownSuccess and OnShutdownError

* 🩹 Fix: deal Listener err

* 🩹 Fix: go lint error

* 🩹 Fix: reduced memory alignment

* 🩹 Fix: reduced memory alignment

* 🩹 Fix: context should be created inside the concatenation.

* 📚 Doc: update what_new.md and hooks.md

* ♻️ Refactor: use blocking channel instead of time.Sleep

* 🩹 Fix: Improve synchronization in error propagation test.

* 🩹 Fix: Replace sleep with proper synchronization.

* 🩹 Fix: Server but not shut down properly

* 🩹 Fix: Using channels to synchronize and pass results

* 🩹 Fix: timeout with long running request

* 📚 Doc: remove OnShutdownError and OnShutdownSuccess from fiber.md

* Update hooks.md

* 🚨 Test: Add graceful shutdown timeout error test case

* 📝 Doc: Restructure hooks documentation for OnPreShutdown and OnPostShutdown

* 📝 Doc: Remove extra whitespace in hooks documentation

---------

Co-authored-by: yingjie.huang <[email protected]>
Co-authored-by: Juan Calderon-Perez <[email protected]>
Bumps [github.com/valyala/fasthttp](https://github.com/valyala/fasthttp) from 1.58.0 to 1.59.0.
- [Release notes](https://github.com/valyala/fasthttp/releases)
- [Commits](valyala/fasthttp@v1.58.0...v1.59.0)

---
updated-dependencies:
- dependency-name: github.com/valyala/fasthttp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…thub.com/valyala/fasthttp-1.59.0

build(deps): bump github.com/valyala/fasthttp from 1.58.0 to 1.59.0
♻️ Refactor: reduce the memory usage of ignoreHeaders

Co-authored-by: Juan Calderon-Perez <[email protected]>
* ♻️ Refactor: improve performance of getSplicedStrList

goos: linux
goarch: amd64
pkg: github.com/gofiber/fiber/v3
cpu: AMD EPYC 7763 64-Core Processor
                           │   old.txt   │               new.txt               │
                           │   sec/op    │   sec/op     vs base                │
_Utils_GetSplicedStrList-4   66.12n ± 1%   51.05n ± 1%  -22.79% (p=0.000 n=50)

                           │  old.txt   │            new.txt             │
                           │    B/op    │    B/op     vs base            │
_Utils_GetSplicedStrList-4   0.000 ± 0%   0.000 ± 0%  ~ (p=1.000 n=50) ¹
¹ all samples are equal

                           │  old.txt   │            new.txt             │
                           │ allocs/op  │ allocs/op   vs base            │
_Utils_GetSplicedStrList-4   0.000 ± 0%   0.000 ± 0%  ~ (p=1.000 n=50) ¹
¹ all samples are equal

* 🚨 Test: add more test for getSplicedStrList

* 🩹 Fix: golangci-lint ifElseChain

* ♻️ Refactor: use more descriptive variable names
* fix handler order in routing
gofiber#3312

* fix handler order in routing
gofiber#3312

* fix handler order in routing
gofiber#3312

* fix handler order in routing
gofiber#3312

* fix handler order in routing
gofiber#3312

---------

Co-authored-by: Juan Calderon-Perez <[email protected]>
* Add go1.24 to CI matrix

* Create codecov.yml

* Lower coverage threshold to 0.5%
Bumps [golang.org/x/crypto](https://github.com/golang/crypto) from 0.33.0 to 0.35.0.
- [Commits](golang/crypto@v0.33.0...v0.35.0)

---
updated-dependencies:
- dependency-name: golang.org/x/crypto
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…lang.org/x/crypto-0.35.0

build(deps): bump golang.org/x/crypto from 0.33.0 to 0.35.0
* ♻️ Refactor: migrate randString to rand/v2

* 🩹 Fix: golangci-lint
…ber#3308)

Bumps [github.com/gofiber/schema](https://github.com/gofiber/schema) from 1.2.0 to 1.3.0.
- [Release notes](https://github.com/gofiber/schema/releases)
- [Commits](gofiber/schema@v1.2.0...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/gofiber/schema
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* deps: update schema to v1.3.0

* bind: add support for multipart file binding

* bind: fix linter

* improve coverage

* fix linter

* add test cases

---------

Co-authored-by: René <[email protected]>
* 📚 Doc: Add addon tab to /docs

* 📚 Doc: Add retry to addon docs

* 📚 Doc: Update retry README.md

* 🎨 Styles: Update addon/retry docs to respect markdownlint-cli2

* 📚 Doc: Update addon tab description to be singular

* 📚 Doc: Use retry prefix in retry docs

* 📚 Doc: Add retry addon to whats_new.md

* 🎨 Styles: Update whats_new.md to respect markdownlint-cli2
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 5.3.1 to 5.4.0.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v5.3.1...v5.4.0)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <[email protected]>
…s/codecov/codecov-action-5.4.0

build(deps): bump codecov/codecov-action from 5.3.1 to 5.4.0
* 🩹 Fix: correct sorting error in sortAcceptedTypes.

* ♻️ Refactor: remove redundant branch

---------

Co-authored-by: Juan Calderon-Perez <[email protected]>
* ♻️ Refactor: improve RoutePatternMatch by adding RemoveEscapeCharBytes

```
goos: linux
goarch: amd64
pkg: github.com/gofiber/fiber/v3
cpu: AMD EPYC 7763 64-Core Processor
                                                                              │ route_pattern_match_old.txt │    route_pattern_match_new.txt     │
                                                                              │           sec/op            │   sec/op     vs base               │
_RoutePatternMatch//api/v1/const_|_match_|_/api/v1/const-4                                      263.4n ± 2%   249.0n ± 4%  -5.47% (p=0.001 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1-4                                        258.7n ± 4%   244.7n ± 2%  -5.43% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/-4                                       254.6n ± 4%   246.3n ± 2%  -3.26% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/something-4                              265.1n ± 4%   255.6n ± 3%  -3.60% (p=0.001 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_match_|_/api/abc/fixedEnd-4                           775.9n ± 3%   775.6n ± 2%       ~ (p=0.424 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_not_match_|_/api/abc/def/fixedEnd-4                   796.7n ± 3%   767.1n ± 2%  -3.72% (p=0.001 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity-4                                  916.2n ± 1%   904.8n ± 3%       ~ (p=0.052 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/-4                                 913.8n ± 4%   909.1n ± 3%       ~ (p=0.393 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/1-4                                915.0n ± 3%   907.2n ± 2%       ~ (p=0.165 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v-4                                      917.5n ± 2%   876.7n ± 2%  -4.46% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v2-4                                     918.5n ± 2%   886.8n ± 2%  -3.45% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v1/-4                                    935.6n ± 2%   901.9n ± 2%  -3.60% (p=0.000 n=10)
geomean                                                                                         588.3n        570.7n       -2.99%

                                                                              │ route_pattern_match_old.txt │     route_pattern_match_new.txt      │
                                                                              │            B/op             │    B/op     vs base                  │
_RoutePatternMatch//api/v1/const_|_match_|_/api/v1/const-4                                       168.0 ± 0%   152.0 ± 0%   -9.52% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1-4                                         160.0 ± 0%   144.0 ± 0%  -10.00% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/-4                                        160.0 ± 0%   144.0 ± 0%  -10.00% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/something-4                               176.0 ± 0%   160.0 ± 0%   -9.09% (p=0.000 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_match_|_/api/abc/fixedEnd-4                            440.0 ± 0%   440.0 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/:param/fixedEnd_|_not_match_|_/api/abc/def/fixedEnd-4                    464.0 ± 0%   440.0 ± 0%   -5.17% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity-4                                   536.0 ± 0%   536.0 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/-4                                  536.0 ± 0%   536.0 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/1-4                                 536.0 ± 0%   536.0 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v-4                                       544.0 ± 0%   528.0 ± 0%   -2.94% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v2-4                                      544.0 ± 0%   528.0 ± 0%   -2.94% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v1/-4                                     544.0 ± 0%   528.0 ± 0%   -2.94% (p=0.000 n=10)
geomean                                                                                          353.7        337.9        -4.47%
¹ all samples are equal

                                                                              │ route_pattern_match_old.txt │     route_pattern_match_new.txt      │
                                                                              │          allocs/op          │ allocs/op   vs base                  │
_RoutePatternMatch//api/v1/const_|_match_|_/api/v1/const-4                                       6.000 ± 0%   5.000 ± 0%  -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1-4                                         6.000 ± 0%   5.000 ± 0%  -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/-4                                        6.000 ± 0%   5.000 ± 0%  -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/something-4                               6.000 ± 0%   5.000 ± 0%  -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_match_|_/api/abc/fixedEnd-4                            13.00 ± 0%   13.00 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/:param/fixedEnd_|_not_match_|_/api/abc/def/fixedEnd-4                    14.00 ± 0%   13.00 ± 0%   -7.14% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity-4                                   14.00 ± 0%   14.00 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/-4                                  14.00 ± 0%   14.00 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/1-4                                 14.00 ± 0%   14.00 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v-4                                       15.00 ± 0%   14.00 ± 0%   -6.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v2-4                                      15.00 ± 0%   14.00 ± 0%   -6.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v1/-4                                     15.00 ± 0%   14.00 ± 0%   -6.67% (p=0.000 n=10)
geomean                                                                                          10.67        9.811        -8.08%
¹ all samples are equal
```

* ♻️ Refactor: returned type of analyseParameterPart and analyseConstantPart

```
goos: linux
goarch: amd64
pkg: github.com/gofiber/fiber/v3
cpu: AMD EPYC 7763 64-Core Processor
                                                                              │ route_pattern_match_old.txt │    route_pattern_match_new3.txt    │
                                                                              │           sec/op            │   sec/op     vs base               │
_RoutePatternMatch//api/v1/const_|_match_|_/api/v1/const-4                                      264.3n ± 2%   253.8n ± 2%  -3.95% (p=0.001 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1-4                                        258.5n ± 1%   247.6n ± 2%  -4.24% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/-4                                       260.8n ± 3%   249.7n ± 4%  -4.26% (p=0.003 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/something-4                              265.4n ± 2%   256.1n ± 2%  -3.49% (p=0.000 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_match_|_/api/abc/fixedEnd-4                           783.8n ± 2%   777.5n ± 3%       ~ (p=0.218 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_not_match_|_/api/abc/def/fixedEnd-4                   797.8n ± 1%   773.6n ± 3%  -3.03% (p=0.001 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity-4                                  920.3n ± 2%   926.0n ± 3%       ~ (p=0.896 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/-4                                 920.4n ± 4%   908.2n ± 2%       ~ (p=0.063 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/1-4                                927.9n ± 2%   919.0n ± 3%       ~ (p=0.579 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v-4                                      920.4n ± 3%   889.5n ± 3%  -3.36% (p=0.007 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v2-4                                     916.9n ± 2%   891.9n ± 2%  -2.73% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v1/-4                                    938.8n ± 5%   891.2n ± 2%  -5.07% (p=0.000 n=10)
geomean                                                                                         591.7n        575.5n       -2.73%

                                                                              │ route_pattern_match_old.txt │     route_pattern_match_new3.txt     │
                                                                              │            B/op             │    B/op     vs base                  │
_RoutePatternMatch//api/v1/const_|_match_|_/api/v1/const-4                                       168.0 ± 0%   152.0 ± 0%   -9.52% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1-4                                         160.0 ± 0%   144.0 ± 0%  -10.00% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/-4                                        160.0 ± 0%   144.0 ± 0%  -10.00% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/something-4                               176.0 ± 0%   160.0 ± 0%   -9.09% (p=0.000 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_match_|_/api/abc/fixedEnd-4                            440.0 ± 0%   440.0 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/:param/fixedEnd_|_not_match_|_/api/abc/def/fixedEnd-4                    464.0 ± 0%   440.0 ± 0%   -5.17% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity-4                                   536.0 ± 0%   536.0 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/-4                                  536.0 ± 0%   536.0 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/1-4                                 536.0 ± 0%   536.0 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v-4                                       544.0 ± 0%   528.0 ± 0%   -2.94% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v2-4                                      544.0 ± 0%   528.0 ± 0%   -2.94% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v1/-4                                     544.0 ± 0%   528.0 ± 0%   -2.94% (p=0.000 n=10)
geomean                                                                                          353.7        337.9        -4.47%
¹ all samples are equal

                                                                              │ route_pattern_match_old.txt │     route_pattern_match_new3.txt     │
                                                                              │          allocs/op          │ allocs/op   vs base                  │
_RoutePatternMatch//api/v1/const_|_match_|_/api/v1/const-4                                       6.000 ± 0%   5.000 ± 0%  -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1-4                                         6.000 ± 0%   5.000 ± 0%  -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/-4                                        6.000 ± 0%   5.000 ± 0%  -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/const_|_not_match_|_/api/v1/something-4                               6.000 ± 0%   5.000 ± 0%  -16.67% (p=0.000 n=10)
_RoutePatternMatch//api/:param/fixedEnd_|_match_|_/api/abc/fixedEnd-4                            13.00 ± 0%   13.00 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/:param/fixedEnd_|_not_match_|_/api/abc/def/fixedEnd-4                    14.00 ± 0%   13.00 ± 0%   -7.14% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity-4                                   14.00 ± 0%   14.00 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/-4                                  14.00 ± 0%   14.00 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_match_|_/api/v1/entity/1-4                                 14.00 ± 0%   14.00 ± 0%        ~ (p=1.000 n=10) ¹
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v-4                                       15.00 ± 0%   14.00 ± 0%   -6.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v2-4                                      15.00 ± 0%   14.00 ± 0%   -6.67% (p=0.000 n=10)
_RoutePatternMatch//api/v1/:param/*_|_not_match_|_/api/v1/-4                                     15.00 ± 0%   14.00 ± 0%   -6.67% (p=0.000 n=10)
geomean                                                                                          10.67        9.811        -8.08%
¹ all samples are equal
```

---------

Co-authored-by: RW <[email protected]>
* Fix: error binder in form_test

* fix: form tag

* Fix: error package name
ReneWerner87 and others added 16 commits July 31, 2025 15:52
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit fixes issue gofiber#2859 where QueryParser incorrectly parses slices
in embedded structs. The comma-separated values in query parameters for
slice fields within embedded structs were not being split correctly.

Changes:
- Modified buildFieldInfo() to recursively process embedded/anonymous structs
- Added proper handling for embedded struct fields using f.Anonymous check
- Embedded struct field names are now correctly merged into parent struct's field map
- Added comprehensive tests covering various embedded struct scenarios

Fixes: gofiber#2859
@kotahorii kotahorii requested a review from a team as a code owner August 2, 2025 16:41
Copy link
Contributor

coderabbitai bot commented Aug 2, 2025

Walkthrough

This pull request primarily updates and streamlines documentation within the .github directory. It introduces a CODEOWNERS file, makes minor corrections and formatting improvements to existing markdown documents, and deletes numerous localized README files. The main README is substantially revised to reflect the release of Fiber v3.

Changes

Cohort / File(s) Change Summary
CODEOWNERS Addition
.github/CODEOWNERS
Adds a CODEOWNERS file assigning @gofiber/maintainers as owners for all files.
Code of Conduct & Contribution Docs
.github/CODE_OF_CONDUCT.md, .github/CONTRIBUTING.md
Updates URL formatting, branch references, section formatting, and grammar in contribution guidelines and code of conduct.
Pull Request Template Removal
.github/PULL_REQUEST_TEMPLATE/v3-changes.md
Deletes the v3 pull request template markdown file.
Main README Overhaul
.github/README.md
Major rewrite and restructuring for Fiber v3, including updated installation, usage, features, and examples.
Localized README Deletions
.github/README_az.md, .github/README_ckb.md, .github/README_de.md, .github/README_eg.md, .github/README_es.md, .github/README_fa.md, .github/README_fr.md, .github/README_he.md, .github/README_id.md, .github/README_it.md, .github/README_ja.md, .github/README_ko.md, .github/README_nl.md, .github/README_pl.md, .github/README_pt.md, .github/README_ru.md, .github/README_sa.md, .github/README_tr.md
Removes all localized README documentation files for various languages.

Sequence Diagram(s)

Not applicable: changes are limited to documentation and configuration, with no new or altered control flow.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Assessment against linked issues

Objective Addressed Explanation
Fix incorrect parsing of slice by QueryParser() with embedded structs (#2859) No code or logic changes related to QueryParser() or struct parsing are present; only documentation and configuration are modified.

Assessment against linked issues: Out-of-scope changes

Code Change Explanation
Addition of CODEOWNERS file (.github/CODEOWNERS) Introducing or changing code ownership is unrelated to the bug fix or parsing logic described in the linked issue.
Major rewrite of main README and deletion of localized READMEs (.github/README*.md) Documentation and translation file changes are not connected to the parsing bug or its resolution.
Updates to code of conduct and contributing guidelines (.github/CODE_OF_CONDUCT.md, .github/CONTRIBUTING.md) These are procedural and formatting updates, not related to the parsing issue.
Deletion of pull request template (.github/PULL_REQUEST_TEMPLATE/v3-changes.md) Removal of a PR template does not address the parsing bug.

Possibly related PRs

Suggested labels

v2

Suggested reviewers

  • ReneWerner87
  • efectn
  • gaby
  • sixcolors

Poem

A rabbit hopped through docs today,
Tidying up in every way.
Old translations set aside,
New v3 banners now reside.
CODEOWNERS watch with careful eyes,
As README clarity multiplies.
🐇✨ Cheers to docs both fresh and neat!

Note

⚡️ Unit Test Generation is now available in beta!

Learn more here, or try it out under "Finishing Touches" below.

✨ Finishing Touches
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Summary of Changes

Hello @kotahorii, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

I've addressed an issue where the QueryParser was incorrectly handling slice fields embedded within structs. Previously, comma-separated values in these fields were not being split as expected. My changes ensure that these complex query parameters are now parsed correctly, leading to more reliable data handling for applications using these features.

Highlights

  • Embedded Struct Slice Parsing Fix: The buildFieldInfo() function in binder/mapping.go has been updated to correctly process embedded/anonymous struct fields, ensuring comma-separated values in slice fields within these structs are properly split.
  • Improved Field Merging: Embedded struct field names are now accurately merged into the parent struct's field map, resolving a core issue in how field information was cached.
  • Comprehensive Test Coverage: New test cases have been added to cover various scenarios involving embedded structs, including nested embedding and mixed parameter handling, to validate the fix and prevent regressions.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point in your pull request via creating an issue comment (i.e. comment on the pull request page) using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in issue comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments or fill out our survey to provide feedback.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 0

🧹 Nitpick comments (4)
.github/CONTRIBUTING.md (2)

5-12: Grammar & clarity of the “titles” section

Even after the update, the sentence

“Titles always we must use prefix according to below:”

is awkward and may confuse contributors.

- Titles always we must use prefix according to below:
+ Always prefix PR titles with one of the icons below:

20-23: Minor wording tweak for mandatory tests

“To be merged if you respect this flow” is unclear. Consider a more direct statement:

-All pull requests that contain a feature or fix are mandatory to have unit tests. Your PR is only to be merged if you respect this flow.
+All feature and bug-fix pull requests must include unit tests; otherwise they will not be merged.
.github/README.md (2)

4-6: Missing alt text on multiple images

Markdown-lint flags every <img> without an alt attribute (MD045).
Adding brief alt text improves accessibility and passes automated checks.

-<img height="125" alt="Fiber" src="...logo.svg">
+<img height="125" alt="Fiber logo" src="...logo.svg">

-<img src="https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?...">
+<img alt="GoDoc" src="https://img.shields.io/badge/%F0%9F%93%9A%20godoc-pkg-00ACD7.svg?...">

Apply similar changes to all other badges, benchmark images and supporter avatars.

Also applies to: 10-17


734-742: Repetitive sentence starts (“make …”)

Six successive bullet points each start with “make …”. While not critical, varying the phrasing or grouping related commands would read better and silences the LanguageTool style warning.

Example:

- **make audit**: Conduct quality checks.
- **make benchmark**: Benchmark code performance.
- **make coverage**: Generate test coverage report.
+ **make audit**        – Quality checks  
+ **make benchmark**    – Performance benchmarks  
+ **make coverage**     – Generate coverage report  
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 81feed9 and d42b0a9.

⛔ Files ignored due to path filters (33)
  • .github/FUNDING.yml is excluded by !**/*.yml
  • .github/ISSUE_TEMPLATE/bug-report.yaml is excluded by !**/*.yaml
  • .github/ISSUE_TEMPLATE/feature-request-v3.yaml is excluded by !**/*.yaml
  • .github/ISSUE_TEMPLATE/feature-request.yaml is excluded by !**/*.yaml
  • .github/ISSUE_TEMPLATE/maintenance-task.yaml is excluded by !**/*.yaml
  • .github/ISSUE_TEMPLATE/question.yaml is excluded by !**/*.yaml
  • .github/codecov.yml is excluded by !**/*.yml
  • .github/copilot-setup-steps.yml is excluded by !**/*.yml
  • .github/labeler.yml is excluded by !**/*.yml
  • .github/release-drafter.yml is excluded by !**/*.yml
  • .github/release.yml is excluded by !**/*.yml
  • .github/testdata/fs/img/fiberpng.jpeg is excluded by !**/*.jpeg, !**/*.jpeg
  • .github/workflows/auto-labeler.yml is excluded by !**/*.yml
  • .github/workflows/benchmark.yml is excluded by !**/*.yml
  • .github/workflows/codeql-analysis.yml is excluded by !**/*.yml
  • .github/workflows/linter.yml is excluded by !**/*.yml
  • .github/workflows/manual-dependabot.yml is excluded by !**/*.yml
  • .github/workflows/markdown.yml is excluded by !**/*.yml
  • .github/workflows/modernize.yml is excluded by !**/*.yml
  • .github/workflows/release-drafter.yml is excluded by !**/*.yml
  • .github/workflows/sync-docs.yml is excluded by !**/*.yml
  • .github/workflows/test.yml is excluded by !**/*.yml
  • .github/workflows/vulncheck.yml is excluded by !**/*.yml
  • .golangci.yml is excluded by !**/*.yml
  • .markdownlint.yml is excluded by !**/*.yml
  • docs/addon/_category_.json is excluded by !**/*.json
  • docs/api/_category_.json is excluded by !**/*.json
  • docs/client/_category_.json is excluded by !**/*.json
  • docs/extra/_category_.json is excluded by !**/*.json
  • docs/guide/_category_.json is excluded by !**/*.json
  • docs/middleware/_category_.json is excluded by !**/*.json
  • go.mod is excluded by !**/*.mod
  • go.sum is excluded by !**/*.sum, !**/*.sum
📒 Files selected for processing (23)
  • .github/CODEOWNERS (1 hunks)
  • .github/CODE_OF_CONDUCT.md (1 hunks)
  • .github/CONTRIBUTING.md (1 hunks)
  • .github/PULL_REQUEST_TEMPLATE/v3-changes.md (0 hunks)
  • .github/README.md (11 hunks)
  • .github/README_az.md (0 hunks)
  • .github/README_ckb.md (0 hunks)
  • .github/README_de.md (0 hunks)
  • .github/README_eg.md (0 hunks)
  • .github/README_es.md (0 hunks)
  • .github/README_fa.md (0 hunks)
  • .github/README_fr.md (0 hunks)
  • .github/README_he.md (0 hunks)
  • .github/README_id.md (0 hunks)
  • .github/README_it.md (0 hunks)
  • .github/README_ja.md (0 hunks)
  • .github/README_ko.md (0 hunks)
  • .github/README_nl.md (0 hunks)
  • .github/README_pl.md (0 hunks)
  • .github/README_pt.md (0 hunks)
  • .github/README_ru.md (0 hunks)
  • .github/README_sa.md (0 hunks)
  • .github/README_tr.md (0 hunks)
💤 Files with no reviewable changes (19)
  • .github/PULL_REQUEST_TEMPLATE/v3-changes.md
  • .github/README_de.md
  • .github/README_pt.md
  • .github/README_fa.md
  • .github/README_pl.md
  • .github/README_tr.md
  • .github/README_id.md
  • .github/README_nl.md
  • .github/README_sa.md
  • .github/README_ru.md
  • .github/README_az.md
  • .github/README_ja.md
  • .github/README_he.md
  • .github/README_es.md
  • .github/README_ckb.md
  • .github/README_fr.md
  • .github/README_ko.md
  • .github/README_eg.md
  • .github/README_it.md
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: ReneWerner87
PR: gofiber/fiber#0
File: :0-0
Timestamp: 2024-12-01T10:28:36.011Z
Learning: Feature request #3224 has been created to add support for square bracket notation and comma-separated values in multipart form data in Fiber, while maintaining binary data transfer capabilities. This would bring parity with the existing form-urlencoded functionality.
Learnt from: ReneWerner87
PR: gofiber/fiber#3161
File: app.go:923-932
Timestamp: 2024-11-15T07:56:21.623Z
Learning: In the Fiber framework, breaking changes are acceptable when moving from version 2 to version 3, including modifications to method signatures such as in the `Test` method in `app.go`.
Learnt from: CR
PR: gofiber/fiber#0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-07-19T15:13:10.652Z
Learning: Applies to docs/** : Review and update the contents of the `docs` folder if necessary when modifying code
📚 Learning: in the fiber framework, breaking changes are acceptable when moving from version 2 to version 3, inc...
Learnt from: ReneWerner87
PR: gofiber/fiber#3161
File: app.go:923-932
Timestamp: 2024-11-15T07:56:21.623Z
Learning: In the Fiber framework, breaking changes are acceptable when moving from version 2 to version 3, including modifications to method signatures such as in the `Test` method in `app.go`.

Applied to files:

  • .github/CODEOWNERS
  • .github/CONTRIBUTING.md
  • .github/README.md
📚 Learning: in documentation files for the fiber framework, code examples are often partial and don't repeat imp...
Learnt from: sixcolors
PR: gofiber/fiber#3446
File: docs/middleware/logger.md:44-44
Timestamp: 2025-05-13T00:19:16.407Z
Learning: In documentation files for the Fiber framework, code examples are often partial and don't repeat import statements that were shown in earlier examples, focusing instead on demonstrating specific usage patterns.

Applied to files:

  • .github/CODEOWNERS
  • .github/README.md
📚 Learning: in the fiber framework, `context()` is being renamed to `requestctx()`, and `usercontext()` to `cont...
Learnt from: gaby
PR: gofiber/fiber#3193
File: middleware/cache/cache_test.go:897-897
Timestamp: 2024-11-08T04:10:42.990Z
Learning: In the Fiber framework, `Context()` is being renamed to `RequestCtx()`, and `UserContext()` to `Context()` to improve clarity and align with Go's context conventions.

Applied to files:

  • .github/README.md
📚 Learning: in the `middleware/adaptor/adaptor.go` file of the fiber framework, when updating context handling, ...
Learnt from: gaby
PR: gofiber/fiber#3193
File: middleware/adaptor/adaptor.go:111-111
Timestamp: 2024-11-10T23:44:13.704Z
Learning: In the `middleware/adaptor/adaptor.go` file of the Fiber framework, when updating context handling, replacing `c.Context()` with `c.RequestCtx()` is appropriate to access the `fasthttp.RequestCtx`.

Applied to files:

  • .github/README.md
📚 Learning: when documenting go interface methods in the fiber project, avoid showing method signatures with the...
Learnt from: mdelapenya
PR: gofiber/fiber#3434
File: docs/api/services.md:39-43
Timestamp: 2025-05-07T13:07:33.899Z
Learning: When documenting Go interface methods in the Fiber project, avoid showing method signatures with the interface type as the receiver (e.g., `func (d *Service) Method()`) since interfaces cannot be used as receivers in Go. Instead, show just the method signature without a receiver or use a placeholder implementation name.

Applied to files:

  • .github/README.md
📚 Learning: in the gofiber/fiber framework, service startup failures should panic rather than allowing the appli...
Learnt from: mdelapenya
PR: gofiber/fiber#3434
File: app.go:623-636
Timestamp: 2025-05-08T08:14:37.302Z
Learning: In the gofiber/fiber framework, service startup failures should panic rather than allowing the application to continue running with degraded functionality, as this is the agreed-upon design decision.

Applied to files:

  • .github/README.md
📚 Learning: in the session middleware `config` struct, `store` is backed by `fiber.storage`; they are different ...
Learnt from: sixcolors
PR: gofiber/fiber#3016
File: middleware/session/config.go:16-26
Timestamp: 2024-09-25T16:17:00.969Z
Learning: In the session middleware `Config` struct, `Store` is backed by `fiber.Storage`; they are different entities serving distinct purposes in session management.

Applied to files:

  • .github/README.md
📚 Learning: the `new` function in the fiber framework automatically calls `startservices` at initialization time...
Learnt from: mdelapenya
PR: gofiber/fiber#3434
File: services_test.go:450-464
Timestamp: 2025-05-15T12:56:45.397Z
Learning: The `New` function in the Fiber framework automatically calls `startServices` at initialization time when services are configured, making explicit calls to `startServices` unnecessary in code that creates an App instance with `New()`.

Applied to files:

  • .github/README.md
📚 Learning: detailed usage examples and explanations for new methods like `removeroute` and `removeroutebyname` ...
Learnt from: ckoch786
PR: gofiber/fiber#3230
File: docs/whats_new.md:944-951
Timestamp: 2024-12-15T19:56:45.935Z
Learning: Detailed usage examples and explanations for new methods like `RemoveRoute` and `RemoveRouteByName` are documented in `docs/api/app.md`, so it's unnecessary to duplicate them in `docs/whats_new.md`.

Applied to files:

  • .github/README.md
📚 Learning: in `defaulterrorhandler(c *fiber.ctx, err error)`, since `c` is a pointer to an interface, we need t...
Learnt from: sixcolors
PR: gofiber/fiber#3016
File: middleware/session/config.go:122-122
Timestamp: 2024-09-25T16:18:34.719Z
Learning: In `DefaultErrorHandler(c *fiber.Ctx, err error)`, since `c` is a pointer to an interface, we need to dereference `*c` when calling interface methods like `SendStatus`.

Applied to files:

  • .github/README.md
📚 Learning: in the fiber framework tests, using `ctx.response.header.cookie` may not be suitable for parsing coo...
Learnt from: sixcolors
PR: gofiber/fiber#3016
File: middleware/csrf/csrf_test.go:188-193
Timestamp: 2024-09-25T15:57:10.221Z
Learning: In the Fiber framework tests, using `ctx.Response.Header.Cookie` may not be suitable for parsing cookies from the response header, as it requires a `*Cookie` and fills it rather than returning a string value; thus, manual parsing of the `Set-Cookie` header may be necessary.

Applied to files:

  • .github/README.md
📚 Learning: in the fiber framework, the `isproxytrusted()` function returns `true` when `trustproxy` is `false`,...
Learnt from: gaby
PR: gofiber/fiber#3170
File: ctx.go:1825-1826
Timestamp: 2024-10-16T14:00:50.724Z
Learning: In the Fiber framework, the `IsProxyTrusted()` function returns `true` when `TrustProxy` is `false`, maintaining compatibility with version 2 behavior.

Applied to files:

  • .github/README.md
🪛 markdownlint-cli2 (0.17.2)
.github/README.md

10-10: Images should have alternate text (alt text)

(MD045, no-alt-text)


13-13: Images should have alternate text (alt text)

(MD045, no-alt-text)


19-19: Images should have alternate text (alt text)

(MD045, no-alt-text)


22-22: Images should have alternate text (alt text)

(MD045, no-alt-text)


25-25: Images should have alternate text (alt text)

(MD045, no-alt-text)


97-97: Images should have alternate text (alt text)

(MD045, no-alt-text)


98-98: Images should have alternate text (alt text)

(MD045, no-alt-text)


751-751: Images should have alternate text (alt text)

(MD045, no-alt-text)


752-752: Images should have alternate text (alt text)

(MD045, no-alt-text)


754-754: Images should have alternate text (alt text)

(MD045, no-alt-text)


755-755: Images should have alternate text (alt text)

(MD045, no-alt-text)


756-756: Images should have alternate text (alt text)

(MD045, no-alt-text)


757-757: Images should have alternate text (alt text)

(MD045, no-alt-text)


758-758: Images should have alternate text (alt text)

(MD045, no-alt-text)


759-759: Images should have alternate text (alt text)

(MD045, no-alt-text)


760-760: Images should have alternate text (alt text)

(MD045, no-alt-text)


761-761: Images should have alternate text (alt text)

(MD045, no-alt-text)


762-762: Images should have alternate text (alt text)

(MD045, no-alt-text)


763-763: Images should have alternate text (alt text)

(MD045, no-alt-text)


764-764: Images should have alternate text (alt text)

(MD045, no-alt-text)


765-765: Images should have alternate text (alt text)

(MD045, no-alt-text)


766-766: Images should have alternate text (alt text)

(MD045, no-alt-text)


767-767: Images should have alternate text (alt text)

(MD045, no-alt-text)


768-768: Images should have alternate text (alt text)

(MD045, no-alt-text)

🪛 LanguageTool
.github/README.md

[style] ~736-~736: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ke audit**: Conduct quality checks. - make benchmark: Benchmark code performance...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~737-~737: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...mark**: Benchmark code performance. - make coverage: Generate test coverage repo...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~738-~738: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...e**: Generate test coverage report. - make format: Automatically format code. - ...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~739-~739: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...ormat**: Automatically format code. - make lint: Run lint checks. - *make test...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~740-~740: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: .... - make lint: Run lint checks. - make test: Execute all tests. - **make tid...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)


[style] ~741-~741: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...- make test: Execute all tests. - make tidy: Tidy dependencies. Run these c...

(ENGLISH_WORD_REPEAT_BEGINNING_RULE)

🔇 Additional comments (3)
.github/CODEOWNERS (1)

1-1: CODEOWNERS line looks correct

The single‐line entry with a wildcard pattern and the @gofiber/maintainers team follows GitHub’s expected syntax.
No action required.

.github/CODE_OF_CONDUCT.md (1)

74-81: Nice URL re-formatting

Converting bare links to Markdown links improves readability without changing content.
Looks good.

.github/README.md (1)

42-50: Verify minimum Go version claim

The README states Fiber v3 “requires Go 1.24 or higher”, but Go 1.24 is not yet released.
Please double-check the intended minimum (likely 1.22) or note that 1.24 is the upcoming target.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request appears to be a large-scale update for the upcoming v3 release, including major documentation overhauls, configuration changes, and removal of translated README files. The changes significantly improve the documentation by providing up-to-date, runnable examples for v3 and clarifying important aspects like limitations and development setup.

However, the pull request title and description are misleading as they only refer to a specific bug fix in the QueryParser, but the provided file changes do not include the relevant code for that fix. It would be beneficial to update the PR description to reflect the full scope of these changes for better tracking and release notes generation.

I have one suggestion regarding the main README file.

Comment on lines +703 to -716
| [template](https://github.com/gofiber/template) | This package contains 9 template engines that can be used with Fiber. |

## 🕶️ Awesome List

For more articles, middlewares, examples or tools check our [awesome list](https://github.com/gofiber/awesome-fiber).
For more articles, middlewares, examples, or tools, check our [awesome list](https://github.com/gofiber/awesome-fiber).

## 👍 Contribute

If you want to say **thank you** and/or support the active development of `Fiber`:
If you want to say **Thank You** and/or support the active development of `Fiber`:

1. Add a [GitHub Star](https://github.com/gofiber/fiber/stargazers) to the project.
2. Tweet about the project [on your 𝕏 (Twitter)](https://x.com/intent/tweet?text=Fiber%20is%20an%20Express%20inspired%20%23web%20%23framework%20built%20on%20top%20of%20Fasthttp%2C%20the%20fastest%20HTTP%20engine%20for%20%23Go.%20Designed%20to%20ease%20things%20up%20for%20%23fast%20development%20with%20zero%20memory%20allocation%20and%20%23performance%20in%20mind%20%F0%9F%9A%80%20https%3A%2F%2Fgithub.com%2Fgofiber%2Ffiber).
3. Write a review or tutorial on [Medium](https://medium.com/), [Dev.to](https://dev.to/) or personal blog.
3. Write a review or tutorial on [Medium](https://medium.com/), [Dev.to](https://dev.to/) or your personal blog.
4. Support the project by donating a [cup of coffee](https://buymeacoff.ee/fenny).

## 💻 Development

To ensure your contributions are ready for a Pull Request, please use the following `Makefile` commands. These tools help maintain code quality and consistency.

- **make help**: Display available commands.
- **make audit**: Conduct quality checks.
- **make benchmark**: Benchmark code performance.
- **make coverage**: Generate test coverage report.
- **make format**: Automatically format code.
- **make lint**: Run lint checks.
- **make test**: Execute all tests.
- **make tidy**: Tidy dependencies.

Run these commands to ensure your code adheres to project standards and best practices.

## ☕ Supporters

Fiber is an open source project that runs on donations to pay the bills e.g. our domain name, gitbook, netlify and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).
Fiber is an open-source project that runs on donations to pay the bills, e.g., our domain name, GitBook, Netlify, and serverless hosting. If you want to support Fiber, you can ☕ [**buy a coffee here**](https://buymeacoff.ee/fenny).

| | User | Donation |
| :--------------------------------------------------------- | :----------------------------------------------- | :------- |
| ![](https://avatars.githubusercontent.com/u/204341?s=25) | [@destari](https://github.com/destari) | ☕ x 10 |
| ![](https://avatars.githubusercontent.com/u/63164982?s=25) | [@dembygenesis](https://github.com/dembygenesis) | ☕ x 5 |
| ![](https://avatars.githubusercontent.com/u/56607882?s=25) | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
| ![](https://avatars.githubusercontent.com/u/27820675?s=25) | [@hendratommy](https://github.com/hendratommy) | ☕ x 5 |
| ![](https://avatars.githubusercontent.com/u/1094221?s=25) | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
| ![](https://avatars.githubusercontent.com/u/194590?s=25) | [@jorgefuertes](https://github.com/jorgefuertes) | ☕ x 5 |
| ![](https://avatars.githubusercontent.com/u/186637?s=25) | [@candidosales](https://github.com/candidosales) | ☕ x 5 |
| ![](https://avatars.githubusercontent.com/u/29659953?s=25) | [@l0nax](https://github.com/l0nax) | ☕ x 3 |
| ![](https://avatars.githubusercontent.com/u/635852?s=25) | [@bihe](https://github.com/bihe) | ☕ x 3 |
| ![](https://avatars.githubusercontent.com/u/307334?s=25) | [@justdave](https://github.com/justdave) | ☕ x 3 |
| ![](https://avatars.githubusercontent.com/u/11155743?s=25) | [@koddr](https://github.com/koddr) | ☕ x 1 |
| ![](https://avatars.githubusercontent.com/u/29042462?s=25) | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
| ---------------------------------------------------------- | ------------------------------------------------ | -------- |
| ![](https://avatars.githubusercontent.com/u/204341?s=25) | [@destari](https://github.com/destari) | ☕ x 10 |
| ![](https://avatars.githubusercontent.com/u/63164982?s=25) | [@dembygenesis](https://github.com/dembygenesis) | ☕ x 5 |
| <img src="https://avatars.githubusercontent.com/u/56607882?s=25" alt="thomasvvugt" style="width: 25px; height: 25px;"> | [@thomasvvugt](https://github.com/thomasvvugt) | ☕ x 5 |
| ![](https://avatars.githubusercontent.com/u/27820675?s=25) | [@hendratommy](https://github.com/hendratommy) | ☕ x 5 |
| ![](https://avatars.githubusercontent.com/u/1094221?s=25) | [@ekaputra07](https://github.com/ekaputra07) | ☕ x 5 |
| ![](https://avatars.githubusercontent.com/u/194590?s=25) | [@jorgefuertes](https://github.com/jorgefuertes) | ☕ x 5 |
| ![](https://avatars.githubusercontent.com/u/186637?s=25) | [@candidosales](https://github.com/candidosales) | ☕ x 5 |
| ![](https://avatars.githubusercontent.com/u/29659953?s=25) | [@l0nax](https://github.com/l0nax) | ☕ x 3 |
| ![](https://avatars.githubusercontent.com/u/635852?s=25) | [@bihe](https://github.com/bihe) | ☕ x 3 |
| ![](https://avatars.githubusercontent.com/u/307334?s=25) | [@justdave](https://github.com/justdave) | ☕ x 3 |
| ![](https://avatars.githubusercontent.com/u/11155743?s=25) | [@koddr](https://github.com/koddr) | ☕ x 1 |
| ![](https://avatars.githubusercontent.com/u/29042462?s=25) | [@lapolinar](https://github.com/lapolinar) | ☕ x 1 |
| ![](https://avatars.githubusercontent.com/u/2978730?s=25) | [@diegowifi](https://github.com/diegowifi) | ☕ x 1 |
| ![](https://avatars.githubusercontent.com/u/44171355?s=25) | [@ssimk0](https://github.com/ssimk0) | ☕ x 1 |
| ![](https://avatars.githubusercontent.com/u/5638101?s=25) | [@raymayemir](https://github.com/raymayemir) | ☕ x 1 |
| ![](https://avatars.githubusercontent.com/u/619996?s=25) | [@melkorm](https://github.com/melkorm) | ☕ x 1 |
| ![](https://avatars.githubusercontent.com/u/31022056?s=25) | [@marvinjwendt](https://github.com/marvinjwendt) | ☕ x 1 |
| ![](https://avatars.githubusercontent.com/u/31921460?s=25) | [@toishy](https://github.com/toishy) | ☕ x 1 |

## ‎‍💻 Code Contributors
## 💻 Code Contributors

<img src="https://opencollective.com/fiber/contributors.svg?width=890&button=false" alt="Code Contributors" style="max-width:100%;">

## ⭐️ Stargazers

<img src="https://starchart.cc/gofiber/fiber.svg" alt="Stargazers over time" style="max-width: 100%">

## ⚠️ License

Copyright (c) 2019-present [Fenny](https://github.com/fenny) and [Contributors](https://github.com/gofiber/fiber/graphs/contributors). `Fiber` is free and open-source software licensed under the [MIT License](https://github.com/gofiber/fiber/blob/master/LICENSE). Official logo was created by [Vic Shóstak](https://github.com/koddr) and distributed under [Creative Commons](https://creativecommons.org/licenses/by-sa/4.0/) license (CC BY-SA 4.0 International).

**Third-party library licenses**
## 🧾 License

- [colorable](https://github.com/mattn/go-colorable/blob/master/LICENSE)
- [isatty](https://github.com/mattn/go-isatty/blob/master/LICENSE)
- [runewidth](https://github.com/mattn/go-runewidth/blob/master/LICENSE)
- [fasthttp](https://github.com/valyala/fasthttp/blob/master/LICENSE)
- [bytebufferpool](https://github.com/valyala/bytebufferpool/blob/master/LICENSE)
- [fwd](https://github.com/philhofer/fwd/blob/master/LICENSE.md)
- [go-ole](https://github.com/go-ole/go-ole/blob/master/LICENSE)
- [gopsutil](https://github.com/shirou/gopsutil/blob/master/LICENSE)
- [msgp](https://github.com/tinylib/msgp/blob/master/LICENSE)
- [schema](https://github.com/gorilla/schema/blob/master/LICENSE)
- [uuid](https://github.com/google/uuid/blob/master/LICENSE)
- [wmi](https://github.com/StackExchange/wmi/blob/master/LICENSE)
Copy link
Contributor

Choose a reason for hiding this comment

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

medium

The list of third-party library licenses has been removed. While this cleans up the README, it's important for users to have easy access to this licensing information. If these libraries are still dependencies of the project, their licenses should be listed somewhere in the repository, for example in a LICENSES or NOTICE file, and the README should link to it. Removing this information entirely could cause legal compliance issues for users of the framework.

@kotahorii kotahorii marked this pull request as draft August 2, 2025 16:46
@gaby
Copy link
Member

gaby commented Aug 2, 2025

@kotahorii The PR was created incorrectly, it brought over +600 commits.

v2 branch is for fiber v2.
main branch is for fiber v3.

@kotahorii
Copy link
Author

This PR is no longer needed as the issue was already fixed in PR #3478 (commit 40d14a9c) on May 26, 2025.

The embedded struct parsing bug has been resolved with the same approach (recursive handling in checkEqualFieldType function) and comprehensive tests have been added.

The conflicts and large diff in this PR occurred because the fix was being applied to code that had already been fixed.

Closing this PR as duplicate/resolved. ✅

@kotahorii kotahorii closed this Aug 2, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.