-
Notifications
You must be signed in to change notification settings - Fork 153
chore: bump module paths for v3 #1427
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Note Other AI code review bot(s) detectedCodeRabbit has detected other AI code review bot(s) in this pull request and will avoid duplicating their findings in the review comments. This may lead to a less comprehensive review. WalkthroughThis PR migrates many contrib packages and docs to Fiber v3: updates import paths to versioned modules, converts handler/callback signatures from Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor Client
participant App as Fiber App
participant Middleware as Middleware (monitor/otelfiber/newrelic)
participant Handler as Route Handler
Client->>App: HTTP Request
App->>Middleware: Middleware.Next(c) %% value fiber.Ctx
alt short-circuit
Middleware-->>Client: short-circuit response
else
App->>Middleware: Middleware.Propagators.Inject(c.Context(), headers)
Middleware-->>App: continue
App->>Middleware: tx := newrelic.FromContext(c.Context())
alt tx != nil
Middleware-->>App: start/end segment
else
Middleware-->>App: no segment
end
App->>Handler: Handler(c)
Handler-->>Client: Response
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
Summary of ChangesHello @ReneWerner87, 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! This pull request systematically updates the module paths and related configurations across the Highlights
Using Gemini Code AssistThe 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 by creating a comment using either
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 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. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. 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
|
There was a problem hiding this 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 introduces a significant refactoring to update module paths across the repository for Fiber v3 compatibility. The changes are extensive, touching configuration files, documentation, and Go module files. Overall, the migration seems well-executed, with necessary adaptations for v3 API changes. However, I've identified a potential issue in the release drafter configuration concerning the new tagging scheme. The proposed tags might not align with the new Go module paths, which could lead to module resolution issues for users. My review includes suggestions to correct the tag templates to ensure proper versioning.
.github/release-drafter-template.yml
Outdated
| tag-template: 'v3/{{FOLDER}}/v$RESOLVED_VERSION' | ||
| tag-prefix: v3/{{FOLDER}}/v |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The tag-template and tag-prefix appear to be missing the /v1 segment, which is present in the name-template and the new module paths (e.g., github.com/gofiber/contrib/v3/casbin/v1). For Go modules to correctly resolve versions, the Git tags must align with the module path. The tags should likely be prefixed with v3/{{FOLDER}}/v1/ to match the module structure.
tag-template: 'v3/{{FOLDER}}/v1/v$RESOLVED_VERSION'
tag-prefix: v3/{{FOLDER}}/v1/vThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
jwt/README.md (1)
18-18: Update minimum Go version in README
Replace "Requires Go 1.25 and above" with "Requires Go 1.21 and above".
🧹 Nitpick comments (9)
websocket/README.md (1)
20-23: Add a language hint to the install snippet.Annotating the fenced block with
shellimproves highlighting and keeps markdownlint (MD040) quiet.-``` +```shell go get -u github.com/gofiber/fiber/v3 go get -u github.com/gofiber/contrib/v3/websocket/v1</blockquote></details> <details> <summary>fibernewrelic/README.md (1)</summary><blockquote> `20-23`: **Add language hint to install snippet.** The fenced block lacks a language tag; markdownlint (MD040) flags this. Adding one keeps our docs lint‑clean and renders with proper syntax highlighting. ```diff -``` +```bash go get -u github.com/gofiber/fiber/v3 go get -u github.com/gofiber/contrib/v3/fibernewrelic/v1fgprof/README.md (1)
41-42: Replace hard tabs with spaces.The code example contains hard tabs (detected by markdownlint MD010 on lines 41, 42, 46, 47, 48). Replace them with spaces for consistency with Markdown best practices.
Example fix for the import block:
import ( - "log" + "log" - "github.com/gofiber/contrib/v3/fgprof/v1" - "github.com/gofiber/fiber/v3" + "github.com/gofiber/contrib/v3/fgprof/v1" + "github.com/gofiber/fiber/v3" )Apply similar changes to lines 46-48 in the main function block.
Also applies to: 46-48
monitor/README.md (1)
51-51: Fix hard tab indentation.The import statement uses a hard tab. Replace it with spaces for consistency.
Apply this diff:
- "github.com/gofiber/contrib/v3/monitor/v1" + "github.com/gofiber/contrib/v3/monitor/v1"circuitbreaker/README.md (1)
79-79: Replace hard tabs with spaces for consistency.Multiple lines in the code examples use hard tabs instead of spaces. For consistency with the rest of the documentation, replace tabs with spaces.
The affected lines include examples throughout the document. Consider running a formatter to replace all hard tabs with spaces, or manually replace them in the code blocks.
Also applies to: 96-98, 104-104, 146-157, 214-214, 234-234
opafiber/README.md (1)
21-23: Add a language hint to the install code blockmarkdownlint (MD040) flags this fenced block because it lacks a language identifier. Please switch to something like “```bash” to keep the lint job clean.
socketio/README.md (1)
20-23: Consider adding a language specifier to the code block.The fenced code block containing shell commands should specify a language for better rendering and syntax highlighting.
Apply this diff to add the language specifier:
-``` +```shell go get -u github.com/gofiber/fiber/v3 go get -u github.com/gofiber/contrib/v3/socketio/v1</blockquote></details> <details> <summary>otelfiber/README.md (1)</summary><blockquote> `66-66`: **Optional: Consider replacing hard tabs with spaces.** The markdown linter flags hard tabs in the code examples. While this may be intentional for formatting, consider using spaces for consistency with markdown best practices. Also applies to: 92-94, 96-96 </blockquote></details> <details> <summary>fiberi18n/README.md (1)</summary><blockquote> `69-69`: **Optional: Replace hard tab with spaces.** The static analysis tool flagged a hard tab character on this line. While this is a minor formatting issue, consider replacing it with spaces for consistency with Markdown best practices. </blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used**: CodeRabbit UI **Review profile**: CHILL **Plan**: Pro <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 1613afab5911d26c810fa056068e081b0cd96360 and c0bb7dca5925881a3118944f8441ab263c24864b. </details> <details> <summary>⛔ Files ignored due to path filters (27)</summary> * `.github/ISSUE_TEMPLATE/bug-report.yaml` is excluded by `!**/*.yaml` * `.github/ISSUE_TEMPLATE/feature-request.yaml` is excluded by `!**/*.yaml` * `.github/ISSUE_TEMPLATE/question.yaml` is excluded by `!**/*.yaml` * `.github/release-drafter-template.yml` is excluded by `!**/*.yml` * `.github/release.yml` is excluded by `!**/*.yml` * `casbin/go.mod` is excluded by `!**/*.mod` * `circuitbreaker/go.mod` is excluded by `!**/*.mod` * `fgprof/go.mod` is excluded by `!**/*.mod` * `fiberi18n/go.mod` is excluded by `!**/*.mod` * `fibernewrelic/go.mod` is excluded by `!**/*.mod` * `fibersentry/go.mod` is excluded by `!**/*.mod` * `fiberzap/go.mod` is excluded by `!**/*.mod` * `fiberzerolog/go.mod` is excluded by `!**/*.mod` * `hcaptcha/go.mod` is excluded by `!**/*.mod` * `jwt/go.mod` is excluded by `!**/*.mod` * `loadshed/go.mod` is excluded by `!**/*.mod` * `monitor/go.mod` is excluded by `!**/*.mod` * `opafiber/go.mod` is excluded by `!**/*.mod` * `otelfiber/example/go.mod` is excluded by `!**/*.mod` * `otelfiber/example/go.sum` is excluded by `!**/*.sum`, `!**/*.sum` * `otelfiber/go.mod` is excluded by `!**/*.mod` * `paseto/go.mod` is excluded by `!**/*.mod` * `socketio/go.mod` is excluded by `!**/*.mod` * `socketio/go.sum` is excluded by `!**/*.sum`, `!**/*.sum` * `swagger/go.mod` is excluded by `!**/*.mod` * `testcontainers/go.mod` is excluded by `!**/*.mod` * `websocket/go.mod` is excluded by `!**/*.mod` </details> <details> <summary>📒 Files selected for processing (41)</summary> * `casbin/README.md` (8 hunks) * `circuitbreaker/README.md` (11 hunks) * `circuitbreaker/circuitbreaker_test.go` (1 hunks) * `fgprof/README.md` (2 hunks) * `fgprof/fgprof_test.go` (3 hunks) * `fiberi18n/README.md` (3 hunks) * `fiberi18n/example/main.go` (1 hunks) * `fibernewrelic/README.md` (5 hunks) * `fibernewrelic/fiber.go` (1 hunks) * `fibernewrelic/fiber_test.go` (1 hunks) * `fibersentry/README.md` (5 hunks) * `fiberzap/README.md` (6 hunks) * `fiberzap/logger_test.go` (1 hunks) * `fiberzap/zap_test.go` (2 hunks) * `fiberzerolog/README.md` (4 hunks) * `fiberzerolog/zerolog_test.go` (1 hunks) * `hcaptcha/README.md` (3 hunks) * `jwt/README.md` (5 hunks) * `jwt/jwt_test.go` (1 hunks) * `loadshed/README.md` (7 hunks) * `loadshed/loadshed_test.go` (1 hunks) * `monitor/README.md` (3 hunks) * `monitor/monitor.go` (1 hunks) * `monitor/monitor_test.go` (3 hunks) * `opafiber/README.md` (5 hunks) * `otelfiber/README.md` (4 hunks) * `otelfiber/doc.go` (1 hunks) * `otelfiber/example/server.go` (1 hunks) * `otelfiber/fiber.go` (3 hunks) * `otelfiber/otelfiber_test/fiber_test.go` (18 hunks) * `otelfiber/semconv.go` (3 hunks) * `paseto/README.md` (6 hunks) * `socketio/README.md` (4 hunks) * `socketio/socketio.go` (1 hunks) * `socketio/socketio_test.go` (1 hunks) * `swagger/README.md` (3 hunks) * `testcontainers/README.md` (4 hunks) * `testcontainers/examples_test.go` (1 hunks) * `testcontainers/testcontainers_test.go` (1 hunks) * `websocket/README.md` (2 hunks) * `websocket/websocket_test.go` (0 hunks) </details> <details> <summary>💤 Files with no reviewable changes (1)</summary> * websocket/websocket_test.go </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>🧠 Learnings (7)</summary> <details> <summary>📓 Common learnings</summary>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 theTestmethod inapp.go.</details> <details> <summary>📚 Learning: 2024-11-08T04:10:42.990Z</summary>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 toRequestCtx(), andUserContext()toContext()to improve clarity and align with Go's context conventions.**Applied to files:** - `fibernewrelic/fiber.go` - `fibernewrelic/fiber_test.go` </details> <details> <summary>📚 Learning: 2024-11-10T23:44:13.704Z</summary>Learnt from: gaby
PR: gofiber/fiber#3193
File: middleware/adaptor/adaptor.go:111-111
Timestamp: 2024-11-10T23:44:13.704Z
Learning: In themiddleware/adaptor/adaptor.gofile of the Fiber framework, when updating context handling, replacingc.Context()withc.RequestCtx()is appropriate to access thefasthttp.RequestCtx.**Applied to files:** - `fibernewrelic/fiber.go` </details> <details> <summary>📚 Learning: 2024-07-03T11:59:00.303Z</summary>Learnt from: ReneWerner87
PR: gofiber/contrib#0
File: :0-0
Timestamp: 2024-07-03T11:59:00.303Z
Learning: The i18n functionality in the gofiber/contrib repository is being refactored from middleware to a global container to improve robustness and performance. The global container will be initialized once before setting up routes and will manage the i18n bundle and localizer map.**Applied to files:** - `fiberi18n/example/main.go` - `fiberi18n/README.md` </details> <details> <summary>📚 Learning: 2024-10-02T23:03:31.727Z</summary>Learnt from: sixcolors
PR: gofiber/fiber#3016
File: middleware/session/store.go:164-167
Timestamp: 2024-10-02T23:03:31.727Z
Learning: Unit tests in this project use testify require.**Applied to files:** - `testcontainers/testcontainers_test.go` - `otelfiber/otelfiber_test/fiber_test.go` </details> <details> <summary>📚 Learning: 2024-11-15T07:56:21.623Z</summary>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 theTestmethod inapp.go.**Applied to files:** - `socketio/socketio_test.go` - `otelfiber/otelfiber_test/fiber_test.go` </details> <details> <summary>📚 Learning: 2024-10-08T19:06:06.583Z</summary>Learnt from: sixcolors
PR: gofiber/fiber#2922
File: middleware/cors/utils.go:63-71
Timestamp: 2024-10-08T19:06:06.583Z
Learning: The project uses the testify/assert package for assertions in unit tests.**Applied to files:** - `fgprof/fgprof_test.go` - `otelfiber/otelfiber_test/fiber_test.go` </details> </details><details> <summary>🪛 markdownlint-cli2 (0.18.1)</summary> <details> <summary>websocket/README.md</summary> 20-20: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 54-54: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>circuitbreaker/README.md</summary> 79-79: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 96-96: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 97-97: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 98-98: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 100-100: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 101-101: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 103-103: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 104-104: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 146-146: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 147-147: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 148-148: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 149-149: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 150-150: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 151-151: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 152-152: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 153-153: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 154-154: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 155-155: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 156-156: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 157-157: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 214-214: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 234-234: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>socketio/README.md</summary> 20-20: Fenced code blocks should have a language specified (MD040, fenced-code-language) </details> <details> <summary>opafiber/README.md</summary> 20-20: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 73-73: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 95-95: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 104-104: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>swagger/README.md</summary> 104-104: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>monitor/README.md</summary> 51-51: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>fgprof/README.md</summary> 41-41: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 42-42: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 46-46: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 47-47: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 48-48: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>fiberzap/README.md</summary> 98-98: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>casbin/README.md</summary> 13-13: Emphasis used instead of a heading (MD036, no-emphasis-as-heading) --- 39-39: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 41-41: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>fibernewrelic/README.md</summary> 19-19: Fenced code blocks should have a language specified (MD040, fenced-code-language) </details> <details> <summary>fiberi18n/README.md</summary> 69-69: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>otelfiber/README.md</summary> 66-66: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 92-92: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 93-93: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 94-94: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 96-96: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> </details> </details> <details> <summary>🔇 Additional comments (70)</summary><blockquote> <details> <summary>fiberzap/logger_test.go (1)</summary><blockquote> `234-234`: **LGTM: Type safety improvement for v3 migration.** The change from `SetLogger[any](logger)` to `SetLogger[*zap.Logger](logger)` strengthens type safety by using a concrete type parameter instead of `any`. This aligns with the v3 API refinements and will be validated at compile time. </blockquote></details> <details> <summary>fgprof/fgprof_test.go (3)</summary><blockquote> `6-6`: **LGTM!** The `strings` import is necessary for the skip guard checks added below. --- `58-61`: **Pragmatic workaround for streaming endpoint testing.** The timeout increase (1500→3000ms) and skip guard are reasonable solutions to handle the Fiber test helper's limitation with streaming endpoints. The pattern is applied consistently across all affected tests. --- `77-80`: **Consistent application of skip guards.** The skip guard pattern matches the one applied in `Test_Fgprof_Path` (lines 59-61), ensuring uniform handling of streaming endpoint limitations across all tests. Also applies to: 84-87 </blockquote></details> <details> <summary>fgprof/README.md (2)</summary><blockquote> `23-23`: **Import path correctly updated for v3.** The module path migration to `github.com/gofiber/contrib/v3/fgprof/v1` follows the new v3 structure and is applied consistently in both the installation instructions and usage example. Also applies to: 41-41 --- `48-48`: **Context signature correctly migrated to Fiber v3.** The handler signature changed from `func(c *fiber.Ctx) error` to `func(c fiber.Ctx) error`, reflecting Fiber v3's breaking change where context is passed by value instead of pointer. Based on learnings. </blockquote></details> <details> <summary>testcontainers/README.md (3)</summary><blockquote> `19-21`: **LGTM! Clear compatibility documentation.** The addition of the Fiber v3 compatibility note is helpful for users migrating from v2 to v3. --- `227-227`: **Import path updates are consistent.** The example code correctly references the new v3/testcontainers/v1 import path in both code examples. Also applies to: 279-279 --- `39-39`: **Module path structure is correct**: testcontainers/go.mod declares `github.com/gofiber/contrib/v3/testcontainers/v1` and no legacy import paths remain. </blockquote></details> <details> <summary>testcontainers/testcontainers_test.go (1)</summary><blockquote> `8-8`: **LGTM! Import path correctly updated.** The import path has been updated to the v3/testcontainers/v1 module path, consistent with the PR migration objective. Test logic remains unchanged. </blockquote></details> <details> <summary>testcontainers/examples_test.go (1)</summary><blockquote> `9-9`: **LGTM! Import path correctly updated.** The import path has been updated to the v3/testcontainers/v1 module path, consistent with the PR migration objective. Example code remains unchanged. </blockquote></details> <details> <summary>monitor/monitor.go (1)</summary><blockquote> `79-79`: **LGTM! Fiber v3 context signature update.** The change from passing the context by pointer (`&c`) to by value (`c`) correctly aligns with Fiber v3's updated `Next` callback signature: `func(c fiber.Ctx) bool` instead of `func(c *fiber.Ctx) bool`. </blockquote></details> <details> <summary>circuitbreaker/circuitbreaker_test.go (1)</summary><blockquote> `716-716`: **LGTM! Fiber v3 Content-Type header expectation.** The test correctly expects `"application/json; charset=utf-8"` for JSON responses, which aligns with Fiber v3's default behavior of including charset in the Content-Type header for JSON responses. </blockquote></details> <details> <summary>loadshed/loadshed_test.go (1)</summary><blockquote> `267-267`: **LGTM! Fiber v3 Content-Type header expectation.** The test correctly expects `"application/json; charset=utf-8"` for JSON responses, consistent with Fiber v3's behavior and other test updates in this PR. </blockquote></details> <details> <summary>monitor/monitor_test.go (3)</summary><blockquote> `126-126`: **LGTM! Fiber v3 Content-Type constant.** The test correctly uses `fiber.MIMEApplicationJSONCharsetUTF8` constant, which is the appropriate expectation for Fiber v3 JSON responses that include charset in the Content-Type header. --- `158-158`: **LGTM! Consistent benchmark expectation.** The benchmark correctly expects `fiber.MIMEApplicationJSONCharsetUTF8`, maintaining consistency with the JSON response behavior updates across the test suite. --- `192-192`: **LGTM! APIOnly mode test update.** The test correctly expects `fiber.MIMEApplicationJSONCharsetUTF8` for the APIOnly mode, completing the consistent migration of Content-Type expectations across all test scenarios. </blockquote></details> <details> <summary>monitor/README.md (2)</summary><blockquote> `21-21`: **LGTM! Fiber v3 import path.** The documentation correctly updates the import path to `github.com/gofiber/contrib/v3/monitor/v1`, aligning with the Fiber v3 module structure. --- `37-37`: **LGTM! Fiber v3 Next signature.** The `Next` callback signature is correctly updated from `func(c *fiber.Ctx) bool` to `func(c fiber.Ctx) bool`, reflecting the value-based context parameter in Fiber v3. </blockquote></details> <details> <summary>loadshed/README.md (3)</summary><blockquote> `21-21`: **LGTM! Fiber v3 import path.** The documentation correctly updates the import path to `github.com/gofiber/contrib/v3/loadshed/v1`, consistent with the Fiber v3 module structure. --- `42-42`: **LGTM! Comprehensive v3 example updates.** All code examples in the README have been correctly updated to: - Use the v3 import path (`github.com/gofiber/contrib/v3/loadshed/v1`) - Use value-based `fiber.Ctx` in handler signatures These changes are consistent and accurately reflect Fiber v3's API. Also applies to: 58-58, 74-74, 88-88, 103-103 --- `117-117`: **LGTM! Configuration table signatures updated.** The `Next` and `OnShed` callback signatures in the configuration table are correctly updated from pointer-based (`func(*fiber.Ctx)`) to value-based (`func(fiber.Ctx)`), accurately documenting the Fiber v3 API changes. Also applies to: 119-119 </blockquote></details> <details> <summary>circuitbreaker/README.md (4)</summary><blockquote> `13-13`: **LGTM! Clear v3 compatibility statement.** The documentation explicitly states Fiber v3 compatibility, helping users understand the version requirements. --- `42-42`: **LGTM! Fiber v3 import path.** The documentation correctly updates the import path to `github.com/gofiber/contrib/v3/circuitbreaker/v1`, consistent with the Fiber v3 module structure. --- `60-62`: **LGTM! Configuration callback signatures updated.** The `OnOpen`, `OnClose`, and `OnHalfOpen` callback signatures are correctly updated from `func(*fiber.Ctx)` to `func(fiber.Ctx)`, accurately reflecting the Fiber v3 value-based context API. --- `79-239`: **LGTM! Comprehensive example updates for v3.** All code examples throughout the README have been consistently updated to: - Use the v3 import path - Use value-based `fiber.Ctx` in all handler and callback signatures The examples are thorough and accurately demonstrate Fiber v3 usage patterns. </blockquote></details> <details> <summary>swagger/README.md (1)</summary><blockquote> `35-151`: **Documentation update looks correct.** Import path, config signature, and compatibility note all align with the Fiber v3 migration. </blockquote></details> <details> <summary>fibernewrelic/fiber.go (1)</summary><blockquote> `118-120`: **LGTM! Correctly updated for Fiber v3.** The change to `c.Context()` correctly adapts to Fiber v3's naming convention where `UserContext()` has been renamed to `Context()`. This aligns with line 100 where the transaction is stored in the user context via `c.SetContext(newrelic.NewContext(c.Context(), txn))`. </blockquote></details> <details> <summary>fibernewrelic/fiber_test.go (1)</summary><blockquote> `387-397`: **LGTM! Good defensive programming.** The addition of the assertion validates that the transaction is successfully retrieved from the context, while the nil check provides safe handling in the unlikely event that `FromContext` returns nil. This pattern appropriately combines test validation with defensive production code. </blockquote></details> <details> <summary>jwt/README.md (2)</summary><blockquote> `26-26`: **LGTM! Installation command correctly updated.** The installation command has been properly updated to use the new v3 module path `github.com/gofiber/contrib/v3/jwt/v1`, which follows Go module versioning conventions. --- `94-94`: **LGTM! All JWT middleware imports have been migrated; no references to the old path remain.** </blockquote></details> <details> <summary>jwt/jwt_test.go (1)</summary><blockquote> `19-19`: **LGTM! Test import path correctly updated.** The JWT middleware import has been properly updated to use the new v3 module path `github.com/gofiber/contrib/v3/jwt/v1`, which is consistent with the README documentation changes. </blockquote></details> <details> <summary>socketio/socketio.go (1)</summary><blockquote> `9-9`: **LGTM! Import path correctly updated for v3 migration.** The websocket import path has been properly updated to use the new versioned module structure (`v3/websocket/v1`), which aligns with the Fiber v3 migration. </blockquote></details> <details> <summary>socketio/socketio_test.go (1)</summary><blockquote> `12-12`: **LGTM! Test import path correctly updated for v3 migration.** The websocket import path has been properly updated to the versioned v3 module path while maintaining the `fws` alias for compatibility with existing test code. </blockquote></details> <details> <summary>socketio/README.md (5)</summary><blockquote> `15-15`: **LGTM! Clear compatibility notice added.** The explicit Fiber v3 compatibility note helps users understand the version requirements at a glance. --- `22-22`: **LGTM! Installation instructions updated for v3.** The import path correctly reflects the new v3 versioned module structure. --- `31-31`: **LGTM! Function signature documentation updated for Fiber v3.** The documented signature correctly reflects the Fiber v3 breaking change where handlers now accept `fiber.Ctx` by value instead of by pointer. Based on learnings --- `71-72`: **LGTM! Example imports updated for v3.** Both socketio and websocket imports correctly use the new versioned v3 module paths. --- `93-93`: **LGTM! Middleware example updated for Fiber v3 API.** The middleware signature correctly demonstrates the Fiber v3 change where `fiber.Ctx` is passed by value instead of by pointer. Based on learnings </blockquote></details> <details> <summary>otelfiber/example/server.go (1)</summary><blockquote> `12-12`: **LGTM! Module path updated for v3 compatibility.** The import path correctly reflects the new v3 module structure. </blockquote></details> <details> <summary>otelfiber/fiber.go (3)</summary><blockquote> `8-8`: **LGTM! Internal import path updated for v3 compatibility.** --- `23-23`: **LGTM! Instrumentation name updated to reflect v3 module path.** --- `176-176`: **LGTM! Context propagation made more robust.** The change from `cfg.Propagators.Inject(ctx, tracingHeaders)` to `cfg.Propagators.Inject(c.Context(), tracingHeaders)` ensures that the injected context reflects any modifications the handler may have made via `c.SetContext()`. This makes the propagation behavior more consistent with the actual context state at injection time. </blockquote></details> <details> <summary>otelfiber/semconv.go (3)</summary><blockquote> `87-94`: **LGTM! Well-designed helper function.** The `requestScheme` helper provides consistent scheme extraction with a safe default and proper string copying. This refactoring eliminates duplication and ensures uniform behavior across metric and trace attribute collection. --- `22-22`: **LGTM! Using the new helper for consistent scheme handling.** --- `46-46`: **LGTM! Using the new helper for consistent scheme handling.** </blockquote></details> <details> <summary>otelfiber/doc.go (1)</summary><blockquote> `6-6`: **LGTM! Package import comment updated for v3.** </blockquote></details> <details> <summary>otelfiber/otelfiber_test/fiber_test.go (6)</summary><blockquote> `10-10`: **LGTM! Import added for explicit timeout durations.** --- `12-12`: **LGTM! Import path updated for v3 compatibility.** --- `32-32`: **LGTM! Instrumentation name constant updated to reflect v3 module path.** --- `45-47`: **LGTM! Test pattern updated for explicit error handling.** The pattern now explicitly captures and validates both the response and error from `app.Test()`, which aligns with Fiber v3's test API and improves test robustness. Based on learnings. Also applies to: 64-66, 86-88, 144-146, 174-176, 190-192, 217-219, 248-250, 314-316, 445-447, 491-493, 533-535, 565-567, 596-598, 634-636 --- `109-109`: **LGTM! Timeout configuration updated for Fiber v3.** Using explicit `fiber.TestConfig{Timeout: 3 * time.Second}` provides clearer timeout semantics compared to the previous approach. Also applies to: 445-445, 533-533, 565-565 --- `319-319`: **LGTM! Added explicit error handling for metric collection.** Properly validates the error from `reader.Collect()`, improving test reliability. Also applies to: 499-499, 639-639 </blockquote></details> <details> <summary>otelfiber/README.md (4)</summary><blockquote> `22-22`: **LGTM! Installation command updated for v3 module path.** --- `37-37`: **LGTM! Function signatures updated to reflect Fiber v3 API.** The signatures correctly show `fiber.Ctx` (value) instead of `*fiber.Ctx` (pointer), consistent with the v3 migration. Based on learnings. Also applies to: 43-45 --- `42-42`: **LGTM! Clearly documents the removed option.** The deprecation notice for `WithServerName` explains that `http.server_name` is no longer supported after semantic conventions v1.12.0, and `server.address` is now used instead. --- `66-66`: **LGTM! Example code updated for v3.** Import path and handler signatures correctly reflect the v3 migration (value-based `fiber.Ctx` instead of pointer-based). Also applies to: 92-100 </blockquote></details> <details> <summary>fiberzap/zap_test.go (2)</summary><blockquote> `475-475`: **Consistent with protocol updates elsewhere.** The protocol expectation updated to `"HTTP/1.1"` is consistent with the changes at line 150 and aligns with Fiber v3 behavior. --- `150-155`: **Tests updated for Fiber v3 default 404 behavior** Protocol is now `"HTTP/1.1"`, response body is `"Not Found"`, and `bytesSent` is `9`, matching Fiber v3’s defaults. </blockquote></details> <details> <summary>fiberzerolog/README.md (5)</summary><blockquote> `21-21`: **LGTM! Module path updated for v3.** The install instructions correctly reference the versioned module path `github.com/gofiber/contrib/v3/fiberzerolog/v1`, aligning with the v3 migration strategy. --- `37-37`: **LGTM! Signature updated for Fiber v3 API.** The `GetLogger` signature correctly updated from pointer-based `func(*fiber.Ctx)` to value-based `func(fiber.Ctx)`, matching Fiber v3's API changes. --- `44-44`: **LGTM! Signature updated for Fiber v3 API.** The `GetResBody` signature correctly updated from pointer-based `func(c *fiber.Ctx) []byte` to value-based `func(c fiber.Ctx) []byte`, consistent with Fiber v3's API surface. --- `53-53`: **LGTM! Import path updated for v3.** The import path correctly references `github.com/gofiber/contrib/v3/fiberzerolog/v1` in the example code. --- `65-65`: **LGTM! Handler signature updated for Fiber v3.** The example handler correctly uses value-based `fiber.Ctx` instead of pointer-based `*fiber.Ctx`, aligning with Fiber v3's API conventions. </blockquote></details> <details> <summary>fiberzerolog/zerolog_test.go (1)</summary><blockquote> `220-220`: **Verify Fiber v3 dependency and protocol string** Confirm the project is using Fiber v3 (check go.mod or go.sum for “github.com/gofiber/fiber/v3”) and ensure that the actual protocol string returned at runtime is “HTTP/1.1” so the test assertion remains accurate. </blockquote></details> <details> <summary>fiberi18n/README.md (4)</summary><blockquote> `21-21`: **LGTM! Import path updated for v3.** The import instruction correctly reflects the new v3 module structure. --- `68-68`: **LGTM! Example handlers updated for Fiber v3.** The example code correctly demonstrates the new value-based context parameter pattern (`func(c fiber.Ctx)` instead of `func(c *fiber.Ctx)`), which aligns with Fiber v3 conventions. Also applies to: 75-75 --- `29-30`: **Signatures match implementation** The documented signatures for Localize and MustLocalize align with their definitions in fiberi18n/i18n.go. --- `36-36`: **Config field signatures in README match implementation exactly.** </blockquote></details> <details> <summary>fiberi18n/example/main.go (1)</summary><blockquote> `6-6`: **Verify example builds with the new v3 import path.** Due to go.work errors, please run in fiberi18n/example:go mod tidy
go buildand confirm that github.com/gofiber/contrib/v3/fiberi18n/v1 resolves and the example compiles. </blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 5
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (12)
fgprof/go.modis excluded by!**/*.modfgprof/go.sumis excluded by!**/*.sum,!**/*.sumfibernewrelic/go.modis excluded by!**/*.modfibernewrelic/go.sumis excluded by!**/*.sum,!**/*.summonitor/go.modis excluded by!**/*.modmonitor/go.sumis excluded by!**/*.sum,!**/*.sumopafiber/go.modis excluded by!**/*.modopafiber/go.sumis excluded by!**/*.sum,!**/*.sumotelfiber/go.modis excluded by!**/*.modotelfiber/go.sumis excluded by!**/*.sum,!**/*.sumtestcontainers/go.modis excluded by!**/*.modtestcontainers/go.sumis excluded by!**/*.sum,!**/*.sum
📒 Files selected for processing (3)
fiberzap/zap.go(1 hunks)fiberzerolog/config.go(1 hunks)otelfiber/fiber.go(4 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- otelfiber/fiber.go
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (18)
- GitHub Check: lint (fgprof)
- GitHub Check: lint (websocket)
- GitHub Check: lint (casbin)
- GitHub Check: lint (otelfiber)
- GitHub Check: lint (fibernewrelic)
- GitHub Check: lint (jwt)
- GitHub Check: lint (paseto)
- GitHub Check: lint (fiberzap)
- GitHub Check: lint (monitor)
- GitHub Check: lint (testcontainers)
- GitHub Check: lint (swagger)
- GitHub Check: lint (circuitbreaker)
- GitHub Check: lint (socketio)
- GitHub Check: lint (fibersentry)
- GitHub Check: lint (loadshed)
- GitHub Check: lint (fiberzerolog)
- GitHub Check: lint (opafiber)
- GitHub Check: lint (fiberi18n)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
fibernewrelic/README.md (1)
97-105: Fix example: callfibernewrelic.FromContext
newrelic.FromContextexpects acontext.Context, but herectxhas typefiber.Ctx, so the example will not compile. Use the helper exported by this package that already bridges the Fiber context to New Relic.- txn := newrelic.FromContext(ctx) + txn := fibernewrelic.FromContext(ctx)hcaptcha/README.md (1)
71-81: Drop the tab characters in the code block.markdownlint (MD010) is tripping over the hard tabs on Lines 71, 77, and 81 inside the Go example. Strip those tabs (leave the lines empty or use spaces) so the linter can pass. Based on static analysis hints.
@@ - + app.Get("/api/", func(c fiber.Ctx) error { @@ - + app.Post("/api/robots-excluded", func(c fiber.Ctx) error { @@ - + log.Fatal(app.Listen(":3000"))
🧹 Nitpick comments (6)
opafiber/README.md (2)
20-23: Add a fenced-code language label.Markdown lint (MD040) flags this block because it lacks a language hint. Please change the opening fence to something like ```bash so the docs lint passes.
72-107: Replace hard tabs in the code sample.Markdown lint (MD010) complains about the tab-indented lines in this example. Switching them to spaces will satisfy the linter without affecting the rendered code.
websocket/README.md (1)
20-23: Add a language hint to the install code block.Markdown lint (MD040) flags unlabeled fences; please mark this shell example as
bashto avoid tooling failures.-``` +```bash go get -u github.com/gofiber/fiber/v3 go get -u github.com/gofiber/contrib/v3/websocket</blockquote></details> <details> <summary>swagger/README.md (1)</summary><blockquote> `100-107`: **Handle markdownlint MD010 around the Go snippet.** markdownlint is flagging the tab-indented `Config` example (Line 104) with MD010, which is expected because gofmt keeps tabs for struct fields. Please wrap this code block with a `<!-- markdownlint-disable MD010 -->` / `<!-- markdownlint-enable MD010 -->` pair or replace the tabs with spaces so the lint job stops failing. </blockquote></details> <details> <summary>casbin/README.md (2)</summary><blockquote> `13-13`: **Convert the compatibility note into a proper heading** Markdownlint flags this bold line as a pseudo-heading (MD036). Promote it to an actual heading to satisfy lint and keep the doc consistent. ```diff -**Compatible with Fiber v3.** +### Compatible with Fiber v3
19-21: Add a shell language hint to the install snippetMarkdownlint (MD040) expects fenced blocks to declare a language. Label this install block as shell to clear the warning and improve syntax highlighting.
-``` +```bash go get -u github.com/gofiber/fiber/v3 go get -u github.com/gofiber/contrib/v3/casbin</blockquote></details> </blockquote></details> <details> <summary>📜 Review details</summary> **Configuration used**: CodeRabbit UI **Review profile**: CHILL **Plan**: Pro <details> <summary>📥 Commits</summary> Reviewing files that changed from the base of the PR and between 86729d7457e8182b4572d3bc78a340e59d7e31ac and 6ae8fa71ceba9a7b8e7c7f70cbe559790b7ccedd. </details> <details> <summary>⛔ Files ignored due to path filters (25)</summary> * `.github/ISSUE_TEMPLATE/bug-report.yaml` is excluded by `!**/*.yaml` * `.github/ISSUE_TEMPLATE/feature-request.yaml` is excluded by `!**/*.yaml` * `.github/ISSUE_TEMPLATE/question.yaml` is excluded by `!**/*.yaml` * `.github/release-drafter-template.yml` is excluded by `!**/*.yml` * `.github/release.yml` is excluded by `!**/*.yml` * `casbin/go.mod` is excluded by `!**/*.mod` * `circuitbreaker/go.mod` is excluded by `!**/*.mod` * `fgprof/go.mod` is excluded by `!**/*.mod` * `fiberi18n/go.mod` is excluded by `!**/*.mod` * `fibernewrelic/go.mod` is excluded by `!**/*.mod` * `fibersentry/go.mod` is excluded by `!**/*.mod` * `fiberzap/go.mod` is excluded by `!**/*.mod` * `fiberzerolog/go.mod` is excluded by `!**/*.mod` * `hcaptcha/go.mod` is excluded by `!**/*.mod` * `jwt/go.mod` is excluded by `!**/*.mod` * `loadshed/go.mod` is excluded by `!**/*.mod` * `monitor/go.mod` is excluded by `!**/*.mod` * `opafiber/go.mod` is excluded by `!**/*.mod` * `otelfiber/example/go.mod` is excluded by `!**/*.mod` * `otelfiber/go.mod` is excluded by `!**/*.mod` * `paseto/go.mod` is excluded by `!**/*.mod` * `socketio/go.mod` is excluded by `!**/*.mod` * `swagger/go.mod` is excluded by `!**/*.mod` * `testcontainers/go.mod` is excluded by `!**/*.mod` * `websocket/go.mod` is excluded by `!**/*.mod` </details> <details> <summary>📒 Files selected for processing (29)</summary> * `casbin/README.md` (8 hunks) * `circuitbreaker/README.md` (11 hunks) * `fgprof/README.md` (2 hunks) * `fiberi18n/README.md` (3 hunks) * `fiberi18n/example/main.go` (1 hunks) * `fibernewrelic/README.md` (5 hunks) * `fibersentry/README.md` (5 hunks) * `fiberzap/README.md` (6 hunks) * `fiberzerolog/README.md` (4 hunks) * `hcaptcha/README.md` (3 hunks) * `jwt/README.md` (5 hunks) * `jwt/jwt_test.go` (1 hunks) * `loadshed/README.md` (7 hunks) * `monitor/README.md` (3 hunks) * `opafiber/README.md` (5 hunks) * `otelfiber/README.md` (4 hunks) * `otelfiber/doc.go` (1 hunks) * `otelfiber/example/server.go` (1 hunks) * `otelfiber/fiber.go` (5 hunks) * `otelfiber/otelfiber_test/fiber_test.go` (18 hunks) * `paseto/README.md` (6 hunks) * `socketio/README.md` (4 hunks) * `socketio/socketio.go` (1 hunks) * `socketio/socketio_test.go` (1 hunks) * `swagger/README.md` (3 hunks) * `testcontainers/README.md` (4 hunks) * `testcontainers/examples_test.go` (1 hunks) * `testcontainers/testcontainers_test.go` (1 hunks) * `websocket/README.md` (2 hunks) </details> <details> <summary>🚧 Files skipped from review as they are similar to previous changes (11)</summary> * socketio/socketio_test.go * jwt/README.md * otelfiber/example/server.go * testcontainers/examples_test.go * otelfiber/doc.go * testcontainers/README.md * otelfiber/fiber.go * jwt/jwt_test.go * testcontainers/testcontainers_test.go * fiberi18n/example/main.go * monitor/README.md </details> <details> <summary>🧰 Additional context used</summary> <details> <summary>🧠 Learnings (4)</summary> <details> <summary>📚 Learning: 2024-11-15T07:56:21.623Z</summary>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 theTestmethod inapp.go.**Applied to files:** - `otelfiber/otelfiber_test/fiber_test.go` - `opafiber/README.md` </details> <details> <summary>📚 Learning: 2024-10-02T23:03:31.727Z</summary>Learnt from: sixcolors
PR: gofiber/fiber#3016
File: middleware/session/store.go:164-167
Timestamp: 2024-10-02T23:03:31.727Z
Learning: Unit tests in this project use testify require.**Applied to files:** - `otelfiber/otelfiber_test/fiber_test.go` </details> <details> <summary>📚 Learning: 2024-07-26T21:00:12.902Z</summary>Learnt from: sixcolors
PR: gofiber/fiber#2922
File: middleware/cors/utils.go:63-71
Timestamp: 2024-07-26T21:00:12.902Z
Learning: The project uses the testify/assert package for assertions in unit tests.**Applied to files:** - `otelfiber/otelfiber_test/fiber_test.go` </details> <details> <summary>📚 Learning: 2024-07-03T11:59:00.303Z</summary>Learnt from: ReneWerner87
PR: gofiber/contrib#0
File: :0-0
Timestamp: 2024-07-03T11:59:00.303Z
Learning: The i18n functionality in the gofiber/contrib repository is being refactored from middleware to a global container to improve robustness and performance. The global container will be initialized once before setting up routes and will manage the i18n bundle and localizer map.**Applied to files:** - `fiberi18n/README.md` </details> </details><details> <summary>🪛 markdownlint-cli2 (0.18.1)</summary> <details> <summary>hcaptcha/README.md</summary> 19-19: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 55-55: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>paseto/README.md</summary> 117-117: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 216-216: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 300-300: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 331-331: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 366-366: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>casbin/README.md</summary> 15-15: Emphasis used instead of a heading (MD036, no-emphasis-as-heading) --- 18-18: Fenced code blocks should have a language specified (MD040, fenced-code-language) </details> <details> <summary>fibernewrelic/README.md</summary> 18-18: Emphasis used instead of a heading (MD036, no-emphasis-as-heading) </details> <details> <summary>circuitbreaker/README.md</summary> 79-79: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 96-96: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 97-97: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 98-98: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 100-100: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 101-101: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 103-103: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 104-104: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 146-146: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 147-147: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 148-148: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 149-149: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 150-150: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 151-151: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 152-152: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 153-153: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 154-154: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 155-155: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 156-156: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 157-157: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 214-214: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 234-234: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>fgprof/README.md</summary> 41-41: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 42-42: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 46-46: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 47-47: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 48-48: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>fibersentry/README.md</summary> 55-55: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 65-65: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 84-84: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 85-85: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 86-86: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 87-87: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 88-88: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 89-89: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 91-91: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 92-92: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 93-93: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 95-95: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 116-116: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>fiberzap/README.md</summary> 111-111: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 113-113: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 114-114: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 115-115: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>opafiber/README.md</summary> 20-20: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 73-73: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 95-95: Hard tabs Column: 1 (MD010, no-hard-tabs) --- 104-104: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>swagger/README.md</summary> 104-104: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> <details> <summary>websocket/README.md</summary> 20-20: Fenced code blocks should have a language specified (MD040, fenced-code-language) --- 54-54: Hard tabs Column: 1 (MD010, no-hard-tabs) </details> </details> </details> <details> <summary>🔇 Additional comments (17)</summary><blockquote> <details> <summary>fiberi18n/README.md (1)</summary><blockquote> `29-82`: **Docs correctly reflect the v3 ctx-value API shift.** Tables and examples now match Fiber v3’s `fiber.Ctx` value semantics and the new contrib import path. Looks consistent end-to-end. </blockquote></details> <details> <summary>paseto/README.md (1)</summary><blockquote> `24-27`: **Import path updates look good.** The `go get` and example imports now correctly reference the v3 contrib module layout. Also applies to: 117-118, 216-217, 300-301, 331-332, 366-367 </blockquote></details> <details> <summary>otelfiber/README.md (4)</summary><blockquote> `22-22`: **LGTM! Import path correctly updated to v3.** The import path has been properly updated to reflect the v3 module structure. --- `37-37`: **LGTM! Function signatures correctly updated for v3.** The callback function signatures have been consistently updated from pointer `*fiber.Ctx` to value `fiber.Ctx`, which aligns with the v3 migration. This breaking change is appropriately documented. Also applies to: 43-45 --- `42-42`: **LGTM! Clear documentation of removed option.** The removal of `WithServerName` is well-documented with a clear explanation of why it was removed (deprecated `http.server_name` attribute) and what replaces it (`server.address` attribute set with hostname). --- `66-66`: **LGTM! Example code properly updated for v3.** The example code correctly demonstrates: - Updated import path to v3 - Handler parameters changed from `*fiber.Ctx` to `fiber.Ctx` These changes are consistent with the documented API changes. Also applies to: 92-92, 96-96 </blockquote></details> <details> <summary>otelfiber/otelfiber_test/fiber_test.go (4)</summary><blockquote> `10-10`: **LGTM! Imports and constants properly updated for v3.** The changes correctly reflect the v3 migration: - `time` import added (needed for timeout configuration) - Import path updated to `github.com/gofiber/contrib/v3/otelfiber` - `instrumentationName` constant updated to match the new module path Also applies to: 12-12, 32-32 --- `45-47`: **LGTM! Test assertions consistently updated for new app.Test() signature.** All test functions have been systematically updated to: 1. Capture both `resp` and `err` from `app.Test()` 2. Use `require.NoError(t, err)` to verify no test execution errors 3. Use `require.NotNil(t, resp)` to ensure response is valid This pattern change aligns with the v3 API and improves error handling in tests. Based on learnings: The project uses testify require for assertions. Also applies to: 64-66, 86-88, 144-146, 174-176, 190-192, 217-219, 248-250, 314-316, 491-493, 596-598, 634-636 --- `109-109`: **LGTM! Timeout configuration added for potentially longer-running tests.** The addition of `fiber.TestConfig{Timeout: 3 * time.Second}` to specific tests (those involving custom attributes, tracing propagation, etc.) is appropriate. This ensures tests don't hang indefinitely if there are issues with the middleware processing. Also applies to: 445-445, 533-533, 565-565 --- `319-319`: **LGTM! Error handling added for metric collection.** The test now properly captures the error from `reader.Collect()` calls, which improves test robustness and follows the same error-handling pattern established throughout the file. Also applies to: 499-499, 639-639 </blockquote></details> <details> <summary>socketio/socketio.go (1)</summary><blockquote> `9-9`: **LGTM! Import path updated for v3 compatibility.** The websocket import path has been correctly updated to use the v3 module path, aligning with the Fiber v3 migration. </blockquote></details> <details> <summary>socketio/README.md (5)</summary><blockquote> `15-16`: **Good addition of v3 compatibility note.** Clear communication of the version requirement helps users understand compatibility constraints. --- `22-22`: **LGTM! Install command updated for v3.** The `go get` command correctly references the v3 module path. --- `31-31`: **Breaking change properly documented.** The signature change from `func(*fiber.Ctx) error` to `func(fiber.Ctx) error` (pointer to value) is a breaking change for Fiber v3. Users upgrading will need to update their code accordingly. The documentation correctly reflects this change. --- `71-72`: **LGTM! Example imports updated consistently.** Both socketio and websocket imports now use the v3 module paths. --- `93-93`: **Middleware signature updated correctly.** The example middleware now uses the value-based context signature `func(c fiber.Ctx) error`, consistent with the breaking change documented in the signature section. </blockquote></details> <details> <summary>fibersentry/README.md (1)</summary><blockquote> `65-66`: **Retain `fiber.Ctx` casts in README** The middleware stores and retrieves the same `fiber.Ctx` type (handler signature is `func(c fiber.Ctx) error`), so the current casts to `fiber.Ctx` are correct and docs don’t need pointer-based examples. > Likely an incorrect or invalid review comment. </blockquote></details> </blockquote></details> </details> <!-- This is an auto-generated comment by CodeRabbit for review status -->
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 6
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
opafiber/README.md (1)
95-105: Fix the anonymous function syntax in the example.
func (ctx fiber.Ctx)is parsed as a method receiver and fails because there is no method name. For an anonymous func it must befunc(ctx fiber.Ctx). Please drop the space afterfunc.Apply this diff to correct it:
- InputCreationMethod: func (ctx fiber.Ctx) (map[string]interface{}, error) { + InputCreationMethod: func(ctx fiber.Ctx) (map[string]interface{}, error) {websocket/README.md (1)
22-55: Fix Go module path for v3.Go expects the major-version suffix at the end of the module path (e.g.,
/websocket/v3). Pointing users togithub.com/gofiber/contrib/v3/websocketwill 404 because that directory/module does not exist. Please keep the docs usinggithub.com/gofiber/contrib/websocket/v3in both the install instructions and import example.Apply this diff to correct the paths:
-go get -u github.com/gofiber/contrib/v3/websocket +go get -u github.com/gofiber/contrib/websocket/v3 @@ - "github.com/gofiber/contrib/v3/websocket" + "github.com/gofiber/contrib/websocket/v3"
🧹 Nitpick comments (2)
opafiber/README.md (1)
20-23: Add a language hint to the install code fence.markdownlint (MD040) now flags this fence because it lacks a language identifier. Please tag it (e.g., ```bash) to satisfy the linter.
otelfiber/README.md (1)
66-66: Consider replacing hard tabs with spaces.Markdownlint flags hard tabs in the code examples. While this is a minor formatting issue, using spaces for indentation is more consistent with Markdown conventions.
Based on learnings from static analysis.
Also applies to: 92-94, 96-96
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (25)
.github/ISSUE_TEMPLATE/bug-report.yamlis excluded by!**/*.yaml.github/ISSUE_TEMPLATE/feature-request.yamlis excluded by!**/*.yaml.github/ISSUE_TEMPLATE/question.yamlis excluded by!**/*.yaml.github/release-drafter-template.ymlis excluded by!**/*.yml.github/release.ymlis excluded by!**/*.ymlcasbin/go.modis excluded by!**/*.modcircuitbreaker/go.modis excluded by!**/*.modfgprof/go.modis excluded by!**/*.modfiberi18n/go.modis excluded by!**/*.modfibernewrelic/go.modis excluded by!**/*.modfibersentry/go.modis excluded by!**/*.modfiberzap/go.modis excluded by!**/*.modfiberzerolog/go.modis excluded by!**/*.modhcaptcha/go.modis excluded by!**/*.modjwt/go.modis excluded by!**/*.modloadshed/go.modis excluded by!**/*.modmonitor/go.modis excluded by!**/*.modopafiber/go.modis excluded by!**/*.modotelfiber/example/go.modis excluded by!**/*.modotelfiber/go.modis excluded by!**/*.modpaseto/go.modis excluded by!**/*.modsocketio/go.modis excluded by!**/*.modswagger/go.modis excluded by!**/*.modtestcontainers/go.modis excluded by!**/*.modwebsocket/go.modis excluded by!**/*.mod
📒 Files selected for processing (29)
casbin/README.md(8 hunks)circuitbreaker/README.md(11 hunks)fgprof/README.md(2 hunks)fiberi18n/README.md(3 hunks)fiberi18n/example/main.go(1 hunks)fibernewrelic/README.md(5 hunks)fibersentry/README.md(5 hunks)fiberzap/README.md(6 hunks)fiberzerolog/README.md(4 hunks)hcaptcha/README.md(3 hunks)jwt/README.md(5 hunks)jwt/jwt_test.go(1 hunks)loadshed/README.md(7 hunks)monitor/README.md(3 hunks)opafiber/README.md(5 hunks)otelfiber/README.md(4 hunks)otelfiber/doc.go(1 hunks)otelfiber/example/server.go(1 hunks)otelfiber/fiber.go(5 hunks)otelfiber/otelfiber_test/fiber_test.go(18 hunks)paseto/README.md(6 hunks)socketio/README.md(4 hunks)socketio/socketio.go(1 hunks)socketio/socketio_test.go(1 hunks)swagger/README.md(3 hunks)testcontainers/README.md(4 hunks)testcontainers/examples_test.go(1 hunks)testcontainers/testcontainers_test.go(1 hunks)websocket/README.md(2 hunks)
✅ Files skipped from review due to trivial changes (1)
- testcontainers/examples_test.go
🚧 Files skipped from review as they are similar to previous changes (10)
- socketio/socketio_test.go
- jwt/jwt_test.go
- fiberi18n/example/main.go
- paseto/README.md
- swagger/README.md
- testcontainers/README.md
- hcaptcha/README.md
- jwt/README.md
- testcontainers/testcontainers_test.go
- monitor/README.md
🧰 Additional context used
🧠 Learnings (4)
📚 Learning: 2024-07-03T11:59:00.303Z
Learnt from: ReneWerner87
PR: gofiber/contrib#0
File: :0-0
Timestamp: 2024-07-03T11:59:00.303Z
Learning: The i18n functionality in the gofiber/contrib repository is being refactored from middleware to a global container to improve robustness and performance. The global container will be initialized once before setting up routes and will manage the i18n bundle and localizer map.
Applied to files:
fiberi18n/README.md
📚 Learning: 2024-11-15T07:56:21.623Z
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:
fiberzap/README.mdopafiber/README.mdotelfiber/README.mdotelfiber/otelfiber_test/fiber_test.go
📚 Learning: 2024-10-02T23:03:31.727Z
Learnt from: sixcolors
PR: gofiber/fiber#3016
File: middleware/session/store.go:164-167
Timestamp: 2024-10-02T23:03:31.727Z
Learning: Unit tests in this project use testify require.
Applied to files:
otelfiber/otelfiber_test/fiber_test.go
📚 Learning: 2024-07-26T21:00:12.902Z
Learnt from: sixcolors
PR: gofiber/fiber#2922
File: middleware/cors/utils.go:63-71
Timestamp: 2024-07-26T21:00:12.902Z
Learning: The project uses the testify/assert package for assertions in unit tests.
Applied to files:
otelfiber/otelfiber_test/fiber_test.go
🪛 markdownlint-cli2 (0.18.1)
websocket/README.md
20-20: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
54-54: Hard tabs
Column: 1
(MD010, no-hard-tabs)
socketio/README.md
20-20: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
opafiber/README.md
19-19: Fenced code blocks should have a language specified
(MD040, fenced-code-language)
otelfiber/README.md
66-66: Hard tabs
Column: 1
(MD010, no-hard-tabs)
92-92: Hard tabs
Column: 1
(MD010, no-hard-tabs)
93-93: Hard tabs
Column: 1
(MD010, no-hard-tabs)
94-94: Hard tabs
Column: 1
(MD010, no-hard-tabs)
96-96: Hard tabs
Column: 1
(MD010, no-hard-tabs)
circuitbreaker/README.md
79-79: Hard tabs
Column: 1
(MD010, no-hard-tabs)
96-96: Hard tabs
Column: 1
(MD010, no-hard-tabs)
97-97: Hard tabs
Column: 1
(MD010, no-hard-tabs)
98-98: Hard tabs
Column: 1
(MD010, no-hard-tabs)
100-100: Hard tabs
Column: 1
(MD010, no-hard-tabs)
101-101: Hard tabs
Column: 1
(MD010, no-hard-tabs)
103-103: Hard tabs
Column: 1
(MD010, no-hard-tabs)
104-104: Hard tabs
Column: 1
(MD010, no-hard-tabs)
146-146: Hard tabs
Column: 1
(MD010, no-hard-tabs)
147-147: Hard tabs
Column: 1
(MD010, no-hard-tabs)
148-148: Hard tabs
Column: 1
(MD010, no-hard-tabs)
149-149: Hard tabs
Column: 1
(MD010, no-hard-tabs)
150-150: Hard tabs
Column: 1
(MD010, no-hard-tabs)
151-151: Hard tabs
Column: 1
(MD010, no-hard-tabs)
152-152: Hard tabs
Column: 1
(MD010, no-hard-tabs)
153-153: Hard tabs
Column: 1
(MD010, no-hard-tabs)
154-154: Hard tabs
Column: 1
(MD010, no-hard-tabs)
155-155: Hard tabs
Column: 1
(MD010, no-hard-tabs)
156-156: Hard tabs
Column: 1
(MD010, no-hard-tabs)
157-157: Hard tabs
Column: 1
(MD010, no-hard-tabs)
214-214: Hard tabs
Column: 1
(MD010, no-hard-tabs)
234-234: Hard tabs
Column: 1
(MD010, no-hard-tabs)
casbin/README.md
72-72: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
78-78: Hard tabs
Column: 1
(MD010, no-hard-tabs)
79-79: Hard tabs
Column: 1
(MD010, no-hard-tabs)
95-95: Hard tabs
Column: 1
(MD010, no-hard-tabs)
106-106: Hard tabs
Column: 1
(MD010, no-hard-tabs)
108-108: Hard tabs
Column: 1
(MD010, no-hard-tabs)
110-110: Hard tabs
Column: 1
(MD010, no-hard-tabs)
111-111: Hard tabs
Column: 1
(MD010, no-hard-tabs)
112-112: Hard tabs
Column: 1
(MD010, no-hard-tabs)
113-113: Hard tabs
Column: 1
(MD010, no-hard-tabs)
114-114: Hard tabs
Column: 1
(MD010, no-hard-tabs)
144-144: Hard tabs
Column: 1
(MD010, no-hard-tabs)
145-145: Hard tabs
Column: 1
(MD010, no-hard-tabs)
146-146: Hard tabs
Column: 1
(MD010, no-hard-tabs)
147-147: Hard tabs
Column: 1
(MD010, no-hard-tabs)
148-148: Hard tabs
Column: 1
(MD010, no-hard-tabs)
fibernewrelic/README.md
18-18: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
🔇 Additional comments (16)
socketio/socketio.go (1)
9-9: LGTM! Import path correctly updated to v3.The module path has been updated to reflect the v3 migration. The usage of the websocket package throughout the file remains unchanged, which is appropriate for a module path bump.
socketio/README.md (4)
15-16: LGTM! Compatibility note clearly added.The documentation now explicitly states compatibility with Fiber v3, which helps users understand the version requirements.
31-31: LGTM! Signature correctly updated to non-pointer Ctx.The function signature has been updated from
func(*fiber.Ctx) errortofunc(fiber.Ctx) error, reflecting Fiber v3's breaking change where context is passed by value instead of by pointer. This is consistent with the v3 migration.
71-72: LGTM! Import paths correctly updated to v3.The example code imports have been updated to use the v3 module paths, ensuring the documentation matches the actual v3 module structure.
93-93: LGTM! Handler signature correctly updated.The middleware example now uses the non-pointer
fiber.Ctxparameter, consistent with the Fiber v3 breaking change. The example code will compile correctly against v3.otelfiber/example/server.go (1)
12-12: LGTM!The import path has been correctly updated to the v3 module path, aligning with the PR's migration objectives.
otelfiber/otelfiber_test/fiber_test.go (3)
10-10: LGTM!The import updates and instrumentationName constant correctly reflect the v3 module path migration.
Also applies to: 12-12, 32-32
45-47: LGTM!The test improvements with explicit error handling (
require.NoError,require.NotNil) are excellent additions that increase test reliability and prevent silent failures. This aligns well with the project's use of testify/require for assertions.Also applies to: 64-66, 86-88, 109-111, 144-146, 174-176, 190-192, 217-219, 248-250, 314-316, 445-447, 491-493, 533-535, 565-567, 596-598, 634-636
109-109: LGTM!The selective addition of explicit timeouts (3 seconds) to specific tests improves test stability and prevents potential hangs in CI/CD environments.
Also applies to: 445-445, 533-533, 565-565
otelfiber/fiber.go (4)
8-8: LGTM!The import path and instrumentationName constant are correctly updated to reflect the v3 module structure.
Also applies to: 23-23
113-117: LGTM!The header extraction has been correctly updated to use Fiber v3's
GetReqHeaders()API, properly handling multiple values per header.
166-166: LGTM!Adding
c.SetContext(savedCtx)beforecancel()ensures proper context restoration during cleanup, preventing potential context state issues.
178-178: LGTM!The propagation injection correctly uses
c.Context()to provide the current context, aligning with OpenTelemetry's TextMapPropagator interface requirements.otelfiber/README.md (3)
22-22: LGTM!The installation command and example import path are correctly updated to the v3 module path.
Also applies to: 66-66
37-37: LGTM!The API signatures correctly reflect Fiber v3's change to non-pointer
fiber.Ctxparameters. These breaking changes are appropriate for a major version upgrade.Also applies to: 43-45
92-94: LGTM!The example route handlers correctly demonstrate the v3 API with non-pointer
fiber.Ctxparameters.Also applies to: 96-100
gaby
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 LGTM, pending solving coderabbit comments
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 10
♻️ Duplicate comments (3)
fibernewrelic/README.md (1)
21-22: Fix module path: add/v1suffix everywhere.The module still declares
module github.com/gofiber/contrib/v3/fibernewrelic/v1, so the install command and both import snippets need the/v1suffix. Without it,go getand the sample code will fail for users who copy these instructions.Apply this diff:
-go get -u github.com/gofiber/contrib/v3/fibernewrelic +go get -u github.com/gofiber/contrib/v3/fibernewrelic/v1 @@ - "github.com/gofiber/contrib/v3/fibernewrelic" + "github.com/gofiber/contrib/v3/fibernewrelic/v1" @@ - "github.com/gofiber/contrib/v3/fibernewrelic" + "github.com/gofiber/contrib/v3/fibernewrelic/v1"Also applies to: 50-52, 79-81
loadshed/README.md (1)
117-119: Docs still misstate Config callback signature
Config.NextandConfig.OnShedremainfunc(*fiber.Ctx)inloadshed/config.go, so documentingfunc(fiber.Ctx)is incorrect until the code changes too. Please revert these signatures in the README to the pointer form to match the live API.socketio/README.md (1)
20-23: Usebashfence to honor the earlier request.The previous review explicitly asked for a
bashlanguage tag on this block; switching toshdoesn’t address that feedback and will keep the lint warning around. Please change the opening fence to ```bash.
🧹 Nitpick comments (1)
paseto/README.md (1)
309-313: Optional: reinforce cookie security best practices in the exampleConsider adding a brief note below this snippet to set tokens with HttpOnly, Secure, and an appropriate SameSite policy when issuing the cookie.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (19)
casbin/README.md(8 hunks)circuitbreaker/README.md(10 hunks)fgprof/README.md(2 hunks)fiberi18n/README.md(1 hunks)fibernewrelic/README.md(4 hunks)fibersentry/README.md(2 hunks)fiberzap/README.md(6 hunks)fiberzerolog/README.md(4 hunks)hcaptcha/README.md(4 hunks)jwt/README.md(7 hunks)loadshed/README.md(8 hunks)monitor/README.md(4 hunks)opafiber/README.md(3 hunks)otelfiber/README.md(3 hunks)otelfiber/doc.go(1 hunks)paseto/README.md(12 hunks)socketio/README.md(4 hunks)swagger/README.md(2 hunks)websocket/README.md(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (4)
- hcaptcha/README.md
- jwt/README.md
- monitor/README.md
- circuitbreaker/README.md
🧰 Additional context used
🧠 Learnings (3)
📚 Learning: 2024-11-15T07:56:21.623Z
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:
otelfiber/README.mdopafiber/README.md
📚 Learning: 2024-11-23T19:50:41.765Z
Learnt from: norri
PR: gofiber/recipes#2701
File: clean-code/app/server/server.go:14-16
Timestamp: 2024-11-23T19:50:41.765Z
Learning: In the `clean-code` example at `clean-code/app/server/server.go` using the Go Fiber framework, it's acceptable to omit production-level features like context usage and graceful shutdown handling to keep the example simple.
Applied to files:
otelfiber/README.mdfgprof/README.md
📚 Learning: 2024-07-03T11:59:00.303Z
Learnt from: ReneWerner87
PR: gofiber/contrib#0
File: :0-0
Timestamp: 2024-07-03T11:59:00.303Z
Learning: The i18n functionality in the gofiber/contrib repository is being refactored from middleware to a global container to improve robustness and performance. The global container will be initialized once before setting up routes and will manage the i18n bundle and localizer map.
Applied to files:
fiberi18n/README.md
🪛 Gitleaks (8.28.0)
paseto/README.md
[high] 195-195: Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource.
(curl-auth-header)
[high] 464-464: Discovered a potential authorization token provided in a curl command header, which could compromise the curl accessed resource.
(curl-auth-header)
🪛 markdownlint-cli2 (0.18.1)
fiberzap/README.md
41-41: Bare URL used
(MD034, no-bare-urls)
casbin/README.md
15-15: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
22-22: Link text should be descriptive
(MD059, descriptive-link-text)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: lint (fiberi18n)
- GitHub Check: lint (fibernewrelic)
🔇 Additional comments (8)
websocket/README.md (1)
20-23: Install snippet looks good.The
/v3module paths in the install snippet match Fiber’s v3 module layout—thanks for keeping the docs current.otelfiber/doc.go (1)
6-6: LGTM! The syntax error has been resolved.The import directive now correctly includes both opening and closing quotes around the module path. The v3 migration is properly applied.
otelfiber/README.md (3)
21-23: LGTM! Install command correctly updated for v3.The installation command properly references the v3 module path.
37-46: LGTM! Configuration table properly updated for v3.All function signatures have been correctly updated from
*fiber.Ctxtofiber.Ctx, and the removal ofWithServerNameis well-documented with clear rationale about the deprecatedhttp.server_nameattribute.
54-132: Example code structure looks good overall.The example properly demonstrates v3 usage with correct imports and handler signatures. The initialization, middleware setup, and error handling patterns are well-structured. Once the syntax error at line 99 is fixed, this will be a solid example for users migrating to v3.
fiberzap/README.md (1)
20-21: Module pathgithub.com/gofiber/contrib/v3/fiberzapis correct. The go.mod declaresmodule github.com/gofiber/contrib/v3/fiberzap, so the existing install and import snippets require no changes.Likely an incorrect or invalid review comment.
paseto/README.md (2)
23-27: v3 install paths LGTMImport paths correctly point to Fiber v3 and contrib/v3.
89-97: Migration example reads wellClear old/new mapping from TokenPrefix → Extractor. No issues.
There was a problem hiding this 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 (1)
opafiber/README.md (1)
15-16: Convert the bold note into an actual heading to silence MD036.markdownlint flags
**Compatible with Fiber v3.**(MD036). Switch to a heading like## Compatible with Fiber v3or rephrase without emphasis so lint passes. Based on static analysis hint.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
opafiber/README.md(3 hunks)otelfiber/README.md(3 hunks)paseto/README.md(10 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- otelfiber/README.md
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2024-11-15T07:56:21.623Z
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:
opafiber/README.md
🪛 markdownlint-cli2 (0.18.1)
opafiber/README.md
17-17: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (15)
- GitHub Check: lint (websocket)
- GitHub Check: lint (fibernewrelic)
- GitHub Check: lint (circuitbreaker)
- GitHub Check: lint (casbin)
- GitHub Check: lint (fiberzerolog)
- GitHub Check: lint (fiberzap)
- GitHub Check: lint (jwt)
- GitHub Check: lint (fgprof)
- GitHub Check: lint (otelfiber)
- GitHub Check: lint (fibersentry)
- GitHub Check: lint (monitor)
- GitHub Check: lint (loadshed)
- GitHub Check: lint (opafiber)
- GitHub Check: lint (swagger)
- GitHub Check: lint (testcontainers)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
jwt/README.md (1)
162-186: Missing import in Cookie Extractor Example will cause compilation error.The Cookie Extractor Example (lines 162–186) uses
extractors.FromCookie("token")at line 177 but does not import the extractors package. The import block at lines 166–169 is missing:import ( "github.com/gofiber/fiber/v3/extractors" )This example would fail to compile as-is. While updating import paths for the v3 migration, this should be fixed to keep all examples functional.
Add the missing import:
import ( "github.com/gofiber/fiber/v3" + + "github.com/gofiber/fiber/v3/extractors" jwtware "github.com/gofiber/contrib/jwt/v2" )
♻️ Duplicate comments (1)
fiberzerolog/README.md (1)
17-23: Still using v2 module path for Fiber v3 migration.The go get command on line 21 and import on line 53 reference
fiberzerolog/v2, but this PR bumps to Fiber v3 and all handler signatures (line 65) now use value-basedfiber.Ctx. The module path should be v3 to match the API version and past review guidance.-go get -u github.com/gofiber/contrib/fiberzerolog/v2 +go get -u github.com/gofiber/contrib/fiberzerolog/v3Also update the import on line 53:
- "github.com/gofiber/contrib/fiberzerolog/v2" + "github.com/gofiber/contrib/fiberzerolog/v3"
🧹 Nitpick comments (2)
paseto/README.md (1)
183-183: Use proper markdown headings instead of emphasis for better structure.Lines marked "Response", "Login using...", "Request a restricted resource...", etc. are currently formatted as emphasis but should be markdown headings (
### Response,### Login using..., etc.) to comply with markdown conventions and improve document structure.Apply this diff to fix the markdown structure:
_Response_ -```json -{ - "token": "<local-token>" -} -``` +### Response + +```json +{ + "token": "<local-token>" +} +```Repeat for lines 197 (Request a restricted resource...), 453 (Response), and 467 (Request a restricted resource...).
Also applies to: 197-197, 453-453, 467-467
fiberzap/README.md (1)
36-36: Minor grammar and spelling improvements in the config table (optional).The configuration table contains a few minor phrasing issues flagged by static analysis (e.g., "fields what you want see" → "fields you want to see", "you can set GetResBody func" → "you can use the GetResBody function"). These are optional improvements to enhance documentation clarity.
Also applies to: 37-37, 40-40, 42-42
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (25)
.github/ISSUE_TEMPLATE/bug-report.yamlis excluded by!**/*.yaml.github/ISSUE_TEMPLATE/feature-request.yamlis excluded by!**/*.yaml.github/ISSUE_TEMPLATE/question.yamlis excluded by!**/*.yaml.github/release-drafter-template.ymlis excluded by!**/*.yml.github/release.ymlis excluded by!**/*.ymlcasbin/go.modis excluded by!**/*.modcircuitbreaker/go.modis excluded by!**/*.modfgprof/go.modis excluded by!**/*.modfiberi18n/go.modis excluded by!**/*.modfibernewrelic/go.modis excluded by!**/*.modfibersentry/go.modis excluded by!**/*.modfiberzap/go.modis excluded by!**/*.modfiberzerolog/go.modis excluded by!**/*.modhcaptcha/go.modis excluded by!**/*.modjwt/go.modis excluded by!**/*.modloadshed/go.modis excluded by!**/*.modmonitor/go.modis excluded by!**/*.modopafiber/go.modis excluded by!**/*.modotelfiber/example/go.modis excluded by!**/*.modotelfiber/go.modis excluded by!**/*.modpaseto/go.modis excluded by!**/*.modsocketio/go.modis excluded by!**/*.modswagger/go.modis excluded by!**/*.modtestcontainers/go.modis excluded by!**/*.modwebsocket/go.modis excluded by!**/*.mod
📒 Files selected for processing (29)
casbin/README.md(8 hunks)circuitbreaker/README.md(10 hunks)fgprof/README.md(2 hunks)fiberi18n/README.md(1 hunks)fiberi18n/example/main.go(1 hunks)fibernewrelic/README.md(4 hunks)fibersentry/README.md(2 hunks)fiberzap/README.md(6 hunks)fiberzerolog/README.md(4 hunks)hcaptcha/README.md(4 hunks)jwt/README.md(7 hunks)jwt/jwt_test.go(1 hunks)loadshed/README.md(8 hunks)monitor/README.md(4 hunks)opafiber/README.md(3 hunks)otelfiber/README.md(3 hunks)otelfiber/doc.go(1 hunks)otelfiber/example/server.go(1 hunks)otelfiber/fiber.go(5 hunks)otelfiber/otelfiber_test/fiber_test.go(18 hunks)paseto/README.md(10 hunks)socketio/README.md(4 hunks)socketio/socketio.go(1 hunks)socketio/socketio_test.go(1 hunks)swagger/README.md(2 hunks)testcontainers/README.md(4 hunks)testcontainers/examples_test.go(1 hunks)testcontainers/testcontainers_test.go(1 hunks)websocket/README.md(3 hunks)
🚧 Files skipped from review as they are similar to previous changes (9)
- jwt/jwt_test.go
- hcaptcha/README.md
- otelfiber/example/server.go
- socketio/socketio_test.go
- testcontainers/testcontainers_test.go
- fibernewrelic/README.md
- websocket/README.md
- otelfiber/fiber.go
- testcontainers/examples_test.go
🧰 Additional context used
🧠 Learnings (7)
📚 Learning: 2024-11-15T07:56:21.623Z
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:
fiberi18n/example/main.gootelfiber/otelfiber_test/fiber_test.goopafiber/README.mdfiberzap/README.mdotelfiber/README.mdfibersentry/README.md
📚 Learning: 2024-10-16T10:04:06.328Z
Learnt from: ReneWerner87
PR: gofiber/contrib#0
File: :0-0
Timestamp: 2024-10-16T10:04:06.328Z
Learning: The i18n functionality in the gofiber/contrib repository is being refactored from middleware to a global container to improve robustness and performance. The global container will be initialized once before setting up routes and will manage the i18n bundle and localizer map.
Applied to files:
fiberi18n/example/main.go
📚 Learning: 2025-10-16T07:15:26.529Z
Learnt from: grivera64
PR: gofiber/fiber#3807
File: adapter_test.go:118-144
Timestamp: 2025-10-16T07:15:26.529Z
Learning: In Fiber v3, net/http handlers (http.Handler, http.HandlerFunc, or raw func(http.ResponseWriter, *http.Request)) can be passed directly to routing methods like app.Get(), app.Post(), etc. The framework automatically detects and wraps them internally via toFiberHandler/collectHandlers. The github.com/gofiber/fiber/v3/middleware/adaptor package is legacy and should not be suggested for tests or code using native net/http handler support.
Applied to files:
otelfiber/doc.gofgprof/README.mdpaseto/README.md
📚 Learning: 2025-10-16T07:19:52.418Z
Learnt from: grivera64
PR: gofiber/fiber#3807
File: adapter_test.go:118-144
Timestamp: 2025-10-16T07:19:52.418Z
Learning: In the Fiber codebase, the linter does not allow `require` assertions from within HTTP handlers (including net/http-style handlers). Use `t.Fatalf`, `t.Errorf`, or similar `testing.T` methods for error handling inside handler functions instead.
Applied to files:
otelfiber/otelfiber_test/fiber_test.go
📚 Learning: 2024-10-02T23:03:31.727Z
Learnt from: sixcolors
PR: gofiber/fiber#3016
File: middleware/session/store.go:164-167
Timestamp: 2024-10-02T23:03:31.727Z
Learning: Unit tests in this project use testify require.
Applied to files:
otelfiber/otelfiber_test/fiber_test.go
📚 Learning: 2024-10-08T19:06:06.583Z
Learnt from: sixcolors
PR: gofiber/fiber#2922
File: middleware/cors/utils.go:63-71
Timestamp: 2024-10-08T19:06:06.583Z
Learning: The project uses the testify/assert package for assertions in unit tests.
Applied to files:
otelfiber/otelfiber_test/fiber_test.go
📚 Learning: 2024-11-23T19:50:41.765Z
Learnt from: norri
PR: gofiber/recipes#2701
File: clean-code/app/server/server.go:14-16
Timestamp: 2024-11-23T19:50:41.765Z
Learning: In the `clean-code` example at `clean-code/app/server/server.go` using the Go Fiber framework, it's acceptable to omit production-level features like context usage and graceful shutdown handling to keep the example simple.
Applied to files:
fgprof/README.mdotelfiber/README.md
🪛 LanguageTool
fiberzerolog/README.md
[grammar] ~42-~42: There might be a mistake here.
Context: ...zerolog.WarnLevel, zerolog.InfoLevel}| | SkipURIs |[]string` ...
(QB_NEW_EN)
[grammar] ~43-~43: There might be a mistake here.
Context: ... | | GetResBody | `func(c fiber.Ctx) []b...
(QB_NEW_EN)
[grammar] ~44-~44: There might be a mistake here.
Context: ...eadable. you can set GetResBody func to get readable resBody. ...
(QB_NEW_EN)
fgprof/README.md
[grammar] ~30-~30: There might be a mistake here.
Context: ... | nil | | Prefix | string. | ...
(QB_NEW_EN)
loadshed/README.md
[grammar] ~117-~117: There might be a mistake here.
Context: ...ned true. | nil | | Criteria | LoadCriteria ...
(QB_NEW_EN)
[grammar] ~118-~118: There might be a mistake here.
Context: ...ia. | &CPULoadCriteria{...} | | OnShed | func(c fiber.Ctx) error |...
(QB_NEW_EN)
fiberzap/README.md
[grammar] ~36-~36: There might be a mistake here.
Context: ... | | Fields | []string ...
(QB_NEW_EN)
[grammar] ~37-~37: Ensure spelling is correct
Context: ...[]string | Add fields what you want see. ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~40-~40: There might be a mistake here.
Context: ...zapcore.WarnLevel, zapcore.InfoLevel}| | SkipURIs |[]string` ...
(QB_NEW_EN)
[grammar] ~42-~42: There might be a mistake here.
Context: ...eadable. you can set GetResBody func to get readable resBody. | nil ...
(QB_NEW_EN)
otelfiber/README.md
[grammar] ~37-~37: There might be a mistake here.
Context: ... | | WithTracerProvider | `otelt...
(QB_NEW_EN)
[grammar] ~38-~38: There might be a mistake here.
Context: ...used | | WithMeterProvider | `otelm...
(QB_NEW_EN)
[grammar] ~41-~41: There might be a mistake here.
Context: ...he HTTP requests. | If none are specified, global ones will be used | | (❌ Removed) WithServerName ...
(QB_NEW_EN)
[grammar] ~43-~43: There might be a mistake here.
Context: ...lt formatter returns the route pathRaw | | WithCustomAttributes | `func(...
(QB_NEW_EN)
[grammar] ~45-~45: There might be a mistake here.
Context: ...ributes to the metrics. | nil | | WithCollectClientIP | bool ...
(QB_NEW_EN)
paseto/README.md
[grammar] ~191-~191: There might be a mistake here.
Context: ...t a restricted resource using the token in Authorization request header._ ```sh c...
(QB_NEW_EN)
[grammar] ~461-~461: There might be a mistake here.
Context: ...t a restricted resource using the token in Authorization request header._ ```sh c...
(QB_NEW_EN)
casbin/README.md
[grammar] ~37-~37: There might be a mistake here.
Context: ... | | Enforcer | *casbin.Enforcer ...
(QB_NEW_EN)
[grammar] ~38-~38: There might be a mistake here.
Context: ...r using ModelFilePath & PolicyAdapter| | Lookup |func(fiber.Ctx) strin...
(QB_NEW_EN)
[grammar] ~43-~43: There might be a mistake here.
Context: ... | ### Examples - [Gorm Adapter](https://github.com/svcg/-f...
(QB_NEW_EN)
[grammar] ~44-~44: There might be a mistake here.
Context: ... | ### Examples - Gorm Adapter - [File Adapter](https://github.com/gofiber...
(QB_NEW_EN)
swagger/README.md
[grammar] ~38-~38: There might be a mistake here.
Context: ...ber/contrib/swagger/v2 ### Examples Import the middleware packagego impo...
(QB_NEW_EN)
fiberi18n/README.md
[grammar] ~36-~36: There might be a mistake here.
Context: ... | | RootPath | string ...
(QB_NEW_EN)
🪛 markdownlint-cli2 (0.18.1)
paseto/README.md
183-183: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
197-197: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
453-453: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
467-467: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
casbin/README.md
72-72: Emphasis used instead of a heading
(MD036, no-emphasis-as-heading)
🔇 Additional comments (50)
fibersentry/README.md (3)
15-23: Install section clearly documents v3 migration.The updated commands correctly point to
fibersentry/v2module path (line 21) to align with the new versioned module structure while maintaining Fiber v3 compatibility (line 17). The install instructions are clear and accurate.
47-107: Handler signatures and type assertions are consistent with Fiber v3 conventions.The example correctly migrates from pointer-based
*fiber.Ctxto value-basedfiber.Ctx:
- Imports (lines 51–58) are properly updated to use
v2for fibersentry andv3for fiber- Handler signature on line 84 uses
func(c fiber.Ctx) error(value receiver) — aligns with Fiber v3- Type assertion on line 65 correctly uses
(fiber.Ctx)instead of(*fiber.Ctx)- All middleware/route handlers follow the same pattern consistently
Based on learnings: Breaking changes between v2 and v3 (including Ctx receiver changes) are acceptable.
111-123: BeforeSend callback example is correctly updated for v3.The type assertion on line 116 correctly uses
(fiber.Ctx)value-based receiver, consistent with the main example. This demonstrates the proper way to extract the fiber context within Sentry's callback, which is important for users integrating both libraries.fiberi18n/README.md (3)
17-22: Fiber v3 compatibility and import paths updated correctly.The install instructions and import paths have been properly updated to reference Fiber v3 (
github.com/gofiber/fiber/v3) and the fiberi18n v3 module (github.com/gofiber/contrib/fiberi18n/v3). This is consistent with the overall migration objectives.
29-30: API signatures consistently updated for Fiber v3.The function signatures (
Localize,MustLocalize) and configuration callbacks (Next,LangHandler) have been updated from pointer receivers (*fiber.Ctx) to value receivers (fiber.Ctx). These changes are consistent across the documented API surface and align with the v3 migration pattern observed in other contrib modules.Also applies to: 36-36, 43-43
50-85: Example code properly reflects v3 API.The example has been comprehensively updated:
- Imports corrected to v3 versions and ordered by Go conventions (stdlib, then third-party packages)
- Handler signatures updated to use
fiber.Ctx(non-pointer)- Function calls (
Localize,MustLocalize) use the new parameter types- Configuration and middleware setup follow v3 patterns
Please verify that the example code is syntactically valid for Fiber v3 by confirming the handler signature and middleware integration patterns match the actual v3 API.
swagger/README.md (3)
35-35: Module path updates align with v2 versioning scheme.The
go getand import paths correctly transition from the non-versionedgithub.com/gofiber/contrib/swaggertogithub.com/gofiber/contrib/swagger/v2. This is consistent with Go module versioning semantics and the PR's migration toward Fiber v3 compatibility.Also applies to: 43-43
101-136: Config documentation properly reflects Fiber v3-compatible signatures.The
Nextfield now shows the Fiber v3-compatible signaturefunc(c fiber.Ctx) bool(non-pointerCtx), and all Config fields are well-documented with Optional/Default notations. The default config explicitly includesNext: nil, maintaining consistency.Also applies to: 142-147
151-151: Compatibility note provides clear v3 support messaging.Adding the "Compatible with Fiber v3" statement at the end of the documentation is good practice and clearly communicates the module's compatibility status.
opafiber/README.md (4)
15-16: Clear v3 compatibility messaging.The explicit "Compatible with Fiber v3" note is well-placed and makes it immediately obvious to users which version they need.
20-23: Correct v3 module paths in install instructions.Both dependencies properly reference v3 paths (fiber/v3 and contrib/opafiber/v3), making it clear users need the new versions.
42-42: API documentation correctly reflects Fiber v3 non-pointer Ctx.InputCreationFunc signature uses non-pointer
fiber.Ctx, properly aligned with Fiber v3 conventions in both the config table and type definition.Also applies to: 47-47
72-112: Previous issue resolved; complete and consistent v3 example.The
bytesimport is now present (line 72), resolving the previous review concern. The example is complete with correct v3 import paths (lines 74–75), properly demonstrates non-pointerfiber.Ctxusage throughout (lines 97, 106), and includes all necessary imports for compilation and execution.monitor/README.md (3)
17-22: Import paths and version compatibility correctly updated.The documentation clearly marks Fiber v3 compatibility and correctly bumps the monitor import from v1 (implied) to v2, aligning with the semantic versioning strategy for the v3 migration. Installation instructions are accurate and follow Go module conventions.
37-37: Next callback signature correctly documents the Fiber v3 API change.The removal of the pointer from
fiber.Ctxin the Next callback is a breaking change properly reflected by the v2 version bump. This aligns with the Fiber v3 design pattern and matches the implementation change noted in the enriched summary (cfg.Next(c) instead of cfg.Next(&c)).
73-81: Default config structure is complete and consistent with the Config table.All documented properties are present with sensible defaults, and the Next field correctly defaults to nil. The structure aligns with the updated API documentation.
paseto/README.md (1)
21-21: ✓ V3 migration is consistent across all examples.All Fiber imports are v3, fiber.Ctx usage is non-pointer (v3 style), and paseto module import path is correctly updated to v2 throughout. Prior review issues (unused imports, token placeholders, variable naming, missing fiber import) have been resolved.
Also applies to: 25-25, 113-116, 212-212, 297-297, 328-328, 363-363
casbin/README.md (6)
13-13: Approve: Fiber v3 compatibility banner added correctly.The compatibility statement appropriately signals the v3 support to users.
34-41: Approve: Config table signatures correctly updated for Fiber v3.The callback signatures now correctly use
fiber.Ctx(value receiver) instead of*fiber.Ctx, which aligns with Fiber v3 conventions. The table formatting is also clear.
50-86: Approve: CustomPermission example correctly updated for v3.The example properly imports
casbin/v2, usesfiber.Ctx(non-pointer) in handlers, and the Lookup function signature matches the updated config. Implementation is clear and accurate.
90-121: Approve: RoutePermission example correctly updated for v3.Consistent with Fiber v3 conventions. The import path and handler signatures are correct.
125-155: Approve: RoleAuthorization example correctly updated for v3.Handler signature uses the correct
fiber.Ctx(non-pointer) pattern and import path is consistent.
18-25: No action needed—the import path is correct.The verification confirms that the README accurately reflects the module path declared in
casbin/go.mod. Both declaregithub.com/gofiber/contrib/casbin/v2. The concern about a v3 directory structure or an alternate module path format was not applicable to this repository.testcontainers/README.md (2)
19-19: Documentation note for Fiber v3 compatibility is clear.The addition correctly signals Fiber v3 support for users.
39-39: Module path is correct—no changes needed.Verification confirms that
github.com/gofiber/contrib/testcontainers/v2is the canonical module path as declared intestcontainers/go.mod. Thego getcommand at line 39 and code examples at lines 227 and 279 all correctly reference this module path. The physical directory istestcontainers/(nottestcontainers/v2/), which is standard Go module practice for major version 2 modules.loadshed/README.md (2)
17-17: ✓ Version and import paths correctly updated for v3/v2 compatibility.The module versioning aligns with the Fiber v3 migration: Fiber v3 paired with loadshed v2.
Also applies to: 20-21, 42-42, 74-74
58-58: Verification complete — README documentation matches updated code signatures.The
Configstruct inloadshed/loadshed.gohas been correctly updated:
Nextusesfunc(c fiber.Ctx) bool(non-pointer)OnShedusesfunc(c fiber.Ctx) error(non-pointer)These match the non-pointer signatures now documented in the README (lines 58, 88, 103, 117, 119). The docs/code mismatch concern has been resolved.
socketio/socketio.go (1)
9-9: LGTM! Clean import path update for v2 migration.The websocket module import path has been correctly updated to v2, aligning with the broader Fiber v3 migration. The change is minimal and all usages of
websocket.Connandwebsocket.Configthroughout the file remain compatible.socketio/README.md (3)
15-15: LGTM! Documentation properly updated for v3 migration.The Fiber v3 compatibility notice and updated installation instructions correctly reflect the module path changes. The code block language identifier issue has been properly addressed.
Also applies to: 20-23
71-72: LGTM! Example imports correctly updated to v2.Both socketio and websocket import paths in the example code have been consistently updated to their v2 module paths, ensuring the examples remain functional with the new module structure.
93-93: LGTM! Fiber v3 signature correctly updated.The middleware function signature has been properly updated from
*fiber.Ctxtofiber.Ctx(non-pointer), which is the breaking change required for Fiber v3 compatibility. The example code will now work correctly with v3.otelfiber/doc.go (1)
6-6: LGTM! Import path correctly updated for v3.The package import comment has been properly updated to reflect the v3 module path, and the syntax issue from the previous review has been addressed.
otelfiber/otelfiber_test/fiber_test.go (4)
10-12: LGTM! Imports correctly updated for v3.The
timepackage import and otelfiber v3 import path are properly added to support the test updates.
32-32: LGTM! Instrumentation name correctly updated for v3.The constant now references the v3 module path, maintaining consistency with the migration.
45-47: LGTM! Excellent test hygiene improvements for v3.The tests have been properly updated to:
- Capture both response and error from
app.Test()calls- Assert
require.NoError(t, err)to catch test execution failures- Assert
require.NotNil(t, resp)to ensure valid responses- Use
time.Secondfor timeout durations instead of raw integersThese changes align with Fiber v3's updated test API and improve test reliability. Based on learnings.
Also applies to: 64-66, 86-88, 109-111, 144-146, 174-176, 190-192, 217-219, 248-250, 314-316, 445-447, 491-493, 533-535, 565-567, 596-598, 634-636
319-320: LGTM! Proper error handling for metric collection.The error variable reuse and subsequent assertions are correct and consistent throughout the test suite.
Also applies to: 499-500, 639-640
otelfiber/README.md (3)
19-23: LGTM! Installation instructions correctly updated for v3.The compatibility note and installation command properly reflect the v3 migration.
37-46: LGTM! Function signatures correctly updated for v3.The configuration table accurately reflects the breaking change from
*fiber.Ctxtofiber.Ctxin callback signatures. The deprecation notice forWithServerNameis also clearly documented.
54-131: LGTM! Example code properly updated for v3.The example demonstrates correct usage of otelfiber v3 with:
- Updated import path to
github.com/gofiber/contrib/otelfiber/v3- Handler signatures using
fiber.Ctx(value type, not pointer)- Proper tracer initialization and cleanup
- Valid map literal syntax (previously flagged issue has been resolved)
fiberzap/README.md (2)
17-17: ✅ API signatures and import paths correctly updated for Fiber v3.The changes properly reflect the v3 migration:
- Handler signatures updated from
func(*fiber.Ctx)tofunc(fiber.Ctx)(non-pointer receiver)- Import paths bumped from
fiberzap/v2tofiberzap/v3- Documentation examples consistently reflect the new signatures
This aligns with the Fiber v3 context changes and the breaking changes acceptable for the v2→v3 transition.
Also applies to: 21-21, 35-35, 42-42, 53-53, 66-66, 97-100, 111-119
111-115: Hard tabs have been resolved—no action needed.The code at lines 111–115 now uses spaces for indentation exclusively; no hard-tab characters (
^I) are present. The MD010 linting violation previously flagged has been corrected.jwt/README.md (2)
22-22: Import paths correctly updated for Fiber v3 migration.All import paths have been consistently updated:
- Fiber imports updated to
github.com/gofiber/fiber/v3- JWT contrib imports updated to
github.com/gofiber/contrib/jwt/v2- Documentation correctly reflects "Compatible with Fiber v3" at line 22
The changes align with the module versioning strategy described in the PR objectives.
Also applies to: 25-26, 94-94, 168-168, 231-231, 341-341
119-119: Handler signatures consistently use non-pointerfiber.Ctx.All handler functions throughout the examples correctly use the Fiber v3 signature with non-pointer context parameter:
func(c fiber.Ctx) errorThis is consistent across all code examples and aligns with Fiber v3 conventions.
Also applies to: 147-147, 151-151, 273-273, 302-302, 306-306, 353-353
fiberi18n/example/main.go (1)
6-6: Verified: v3 migration successful.The example builds successfully with
fiberi18n/v3imported at line 6. The module exists and resolves correctly, and the API usage remains unchanged (fiberi18n.New, Localize, MustLocalize). No compilation errors. The handler signatures already use non-pointerfiber.Ctx, confirming v3 compatibility.fgprof/README.md (2)
17-24: Module paths now correctly use Go v-suffix convention.The go-get and import statements have been updated to use the correct Go module path format—with the major version suffix at the end of the path (e.g.,
fgprof/v2) rather than in the middle. This resolves the issues flagged in past reviews.The example uses:
github.com/gofiber/contrib/fgprof/v2(fgprof)github.com/gofiber/fiber/v3(fiber)The combination of fgprof v2 + Fiber v3 aligns with the PR objective to use v2 module paths while maintaining compatibility with Fiber v3, as stated on line 17.
Also applies to: 41-42
48-49: Handler signature correctly uses Fiber v3 API.The example handler signature
func(c fiber.Ctx) erroruses the Fiber v3 convention (non-pointerfiber.Ctx), which is correct and consistent with the v3 import on line 42.circuitbreaker/README.md (4)
13-13: ✅ Fiber v3 compatibility marker added.The addition of "Compatible with Fiber v3" is clear and appropriate for users.
60-62: Callback signatures correctly document error return types.The config table entries for
OnOpen,OnClose, andOnHalfOpenproperly reflectfunc(fiber.Ctx) error, matching the examples and actual handler contracts below. This aligns with the prior fix.
74-116: Code examples properly use non-pointerfiber.Ctxfor v3.The basic setup example and callback signatures correctly reflect Fiber v3's non-pointer context pattern. The use of
func(c fiber.Ctx) erroris consistent throughout.
42-42: The suggested import path format in the review comment is incorrect.The review comment recommends changing imports to
github.com/gofiber/contrib/v3/circuitbreaker, but this violates the established v3 naming convention used throughout the codebase. All v3 modules follow the patterngithub.com/gofiber/contrib/{MODULE}/v3(e.g.,circuitbreaker/v3,fiberi18n/v3,fiberzap/v3,otelfiber/v3—all place/v3after the module name, not before).The correct import path should be
github.com/gofiber/contrib/circuitbreaker/v3, notv3/circuitbreaker.Likely an incorrect or invalid review comment.
| | Property | Type | Description | Default | | ||
| |----------|---------------------------|--------------------------------------------------------------------------------------------------------------------------------------------------|---------| | ||
| | Next | `func(c *fiber.Ctx) bool` | A function to skip this middleware when returned `true`. | `nil` | | ||
| | Next | `func(c fiber.Ctx) bool` | A function to skip this middleware when returned `true`. | `nil` | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix grammatical error in Config table.
Line 30 has a trailing period in the backticked string that should be removed.
-| Next | `func(c fiber.Ctx) bool` | A function to skip this middleware when returned `true`. | `nil` |
+| Next | `func(c fiber.Ctx) bool` | A function to skip this middleware when returned `true`. | `nil` |Wait, let me check the actual line. The Prefix row shows \string`.` with a period after the closing backtick:
-| Prefix | `string`. | Prefix defines a URL prefix added before "/debug/fgprof". Note that it should start with (but not end with) a slash. Example: "/federated-fiber" | `""` |
+| Prefix | `string` | Prefix defines a URL prefix added before "/debug/fgprof". Note that it should start with (but not end with) a slash. Example: "/federated-fiber" | `""` |📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | Next | `func(c fiber.Ctx) bool` | A function to skip this middleware when returned `true`. | `nil` | | |
| | Prefix | `string` | Prefix defines a URL prefix added before "/debug/fgprof". Note that it should start with (but not end with) a slash. Example: "/federated-fiber" | `""` | |
🧰 Tools
🪛 LanguageTool
[grammar] ~30-~30: There might be a mistake here.
Context: ... | nil | | Prefix | string. | ...
(QB_NEW_EN)
🤖 Prompt for AI Agents
In fgprof/README.md around line 30, the Config table's "Prefix" row has a
trailing period placed after the closing backtick of the backticked default
value (e.g. "`string`.") — remove the extraneous period so the backticked string
ends without punctuation (e.g. "`string`") and ensure table formatting/alignment
remains intact.
Replaces #1392
Summary
Testing
https://chatgpt.com/codex/tasks/task_e_68e914980bf88326a2941b9c4b320585
Summary by CodeRabbit