📒 docs: refine v3 migration guide and align listen/hooks docs#4045
📒 docs: refine v3 migration guide and align listen/hooks docs#4045ReneWerner87 merged 1 commit intomainfrom
Conversation
Summary of ChangesHello @gaby, 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 primarily focuses on enhancing and clarifying the documentation for Fiber Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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
|
WalkthroughDocumentation updates clarifying listener configuration terminology and mounting method examples. Changes include renaming ListenerConfig to ListenConfig, removing ListenTLS references from OnListen hooks, and updating sub-application mounting examples from Mount to Use method. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
There was a problem hiding this comment.
Code Review
This pull request provides a series of valuable documentation updates for the v3 migration. The changes effectively clarify the Go 1.25+ requirement, align examples with API changes like using fiber.ListenConfig and app.Use, and replace legacy shutdown callback examples with the new hooks API. The wording improvements and typo fixes across the migration guide and API docs enhance clarity and correctness. Overall, these are excellent refinements that will greatly assist users in migrating to v3.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4045 +/- ##
=======================================
Coverage 91.21% 91.21%
=======================================
Files 119 119
Lines 11117 11117
=======================================
Hits 10140 10140
Misses 620 620
Partials 357 357
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR tightens the v3 migration/doc story around listeners, hooks, and sub-app mounting, and aligns comments/docs with the current APIs.
Changes:
- Clarifies the minimum supported Go version for Fiber v3 and refines the migration guidance in
docs/whats_new.md, including updated listen/TLS and shutdown hook examples. - Aligns hook and listen documentation (
docs/api/hooks.md,docs/extra/internal.md) with the currentListenConfig/OnListen/OnPreShutdownAPIs and the sub-app mounting behavior viaUse. - Updates the
OnListenhook comment inhooks.goto match the removal ofListenTLShelpers and the new listen surface.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| hooks.go | Narrowed the OnListen hook comment to refer only to Listen and Listener, matching the current public API (no ListenTLS helpers). |
| docs/whats_new.md | Updated Go version requirements, shutdown hook migration example, listen/TLS migration details, filesystem vs static middleware wording, and logger helper description so they match the implemented APIs and behavior. |
| docs/extra/internal.md | Updated the sub-application mounting description to correctly describe mounting via Use with a sub-app and the resulting internal mount-path behavior. |
| docs/api/hooks.md | Adjusted OnListen documentation to drop the obsolete ListenTLS reference and updated the OnMount example to mount sub-apps via app.Use("/sub", subApp) as in v3. |
There was a problem hiding this comment.
Actionable comments posted: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
docs/api/hooks.md (1)
131-135:⚠️ Potential issue | 🟡 MinorRun
make markdownto lint the modified documentation file.Per coding guidelines for
**/*.mdfiles, lint this file after modifications.
Motivation
1.25+requirement.ListenConfig, preferTLSConfig, consolidate shutdown hooks).Description
docs/whats_new.mdto require Go1.25+, standardize examples tofiber.ListenConfig, clarify TLS/listen migration, reword filesystem removal and logger helper phrasing, and replace legacy shutdown callbacks example with theOnPostShutdownhook example.docs/api/hooks.mdto remove the obsoleteListenTLSmention from theOnListendescription and replaced the sub-app mount example to useapp.Usewith a sub-app.docs/extra/internal.mdto align the sub-application mounting wording to describeUsesemantics and mounting behavior.hooks.gocomment to reflect current listener APIs by removingListenTLSfrom theOnListenhook comment.