-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
📚 Doc: Update recover docs to not use reserved keyword #3129
📚 Doc: Update recover docs to not use reserved keyword #3129
Conversation
Thanks for opening this pull request! 🎉 Please check out our contributing guidelines. If you need help or want to chat with us, join us on Discord https://gofiber.io/discord |
WalkthroughThe changes involve modifying the import statement for the recover middleware in the Fiber web framework to use an alias. The import has been updated from a direct reference to an aliased reference, which affects how the middleware is invoked in the application. The functionality of the middleware remains unchanged, and the overall application logic continues to operate as intended. Changes
Sequence Diagram(s)sequenceDiagram
participant App
participant Recoverer
App->>Recoverer: Use recover middleware
Recoverer-->>App: Handle panics
Poem
Recent review detailsConfiguration used: CodeRabbit UI Files selected for processing (1)
Files skipped from review due to trivial changes (1)
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
Congrats on merging your first pull request! 🎉 We here at Fiber are proud of you! If you need help or want to chat with us, join us on Discord https://gofiber.io/discord |
Description
Update the documentation for the recover middleware to demonstrate using an alias instead of directly importing. This is important since
recover
is a reserved word in Go (recover function). If you don't explicitly write the import first and instead rely on code actions, lsp, autoformatting, autoimporting etc, you will get an error usingrecover
and it won't import. Therefore I suggest using an alias for the import to avoid conflicting with editors/LSP's and so on. I'm usingrecoverer
since that's the standard naming in other middleware's such as Chi's.Fixes # (issue)
Changes introduced
List the new features or adjustments introduced in this pull request. Provide details on benchmarks, documentation updates, changelog entries, and if applicable, the migration guide.
Type of change
Please delete options that are not relevant.
Checklist
Before you submit your pull request, please make sure you meet these requirements:
/docs/
directory for Fiber's documentation.Commit formatting
Please use emojis in commit messages for an easy way to identify the purpose or intention of a commit. Check out the emoji cheatsheet here: CONTRIBUTING.md