-
-
Notifications
You must be signed in to change notification settings - Fork 1.8k
📒 docs: Update usage of ctx.Redirect() #3417
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
Important Review skippedReview was skipped due to path filters ⛔ Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the WalkthroughThis change updates the Changes
Sequence Diagram(s)No sequence diagram is generated as the changes are documentation-only. Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🪧 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 (
|
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
🧹 Nitpick comments (1)
docs/api/ctx.md (1)
1450-1459
: Enhance readability of status code list
Consider wrapping the HTTP status codes in inline code for clarity within the caution block:- - 303 See Other - - 307 Temporary Redirect - - 308 Permanent Redirect + - `303 See Other` + - `307 Temporary Redirect` + - `308 Permanent Redirect`
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/api/ctx.md
(17 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/api/ctx.md
[uncategorized] ~242-~242: Possible missing article found.
Context: ...aw()) // []byte("user=john") }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~262-~262: Possible missing article found.
Context: ...dy()) // []byte("user=john") }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~322-~322: Possible missing article found.
Context: ...lhost:3000/?name=john&pass=doe" ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~492-~492: Possible missing article found.
Context: ...y", "doe") // "doe" // ... }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~582-~582: Possible missing article found.
Context: ... or "" if not exist // .. }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~618-~618: Possible missing article found.
Context: ..., "john") // "john" // .. }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~629-~629: Possible missing article found.
Context: ...eqHeaders() map[string][]string ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~653-~653: Possible missing article found.
Context: ..., "john") // "john" // .. }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~664-~664: Possible missing article found.
Context: ...spHeaders() map[string][]string ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~710-~710: Possible missing article found.
Context: ...() // "google.com" // ... }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~1057-~1057: Possible missing article found.
Context: ...earch?q=something" // ... }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~1106-~1106: Possible missing article found.
Context: ...f the first wildcard segment }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~1283-~1283: Possible missing article found.
Context: ... "nike") // "nike" // ... }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
🔇 Additional comments (1)
docs/api/ctx.md (1)
242-243
: Consistent admonition formatting across methods
The blockquotes have been updated from hyphen (->
) style to standard Markdown>
syntax, improving consistency and rendering across sections. Nice work!Also applies to: 262-263, 322-323, 492-493, 582-583, 618-619, 629-630, 653-654, 664-665, 710-711, 1057-1058, 1106-1107, 1283-1284
🧰 Tools
🪛 LanguageTool
[uncategorized] ~242-~242: Possible missing article found.
Context: ...aw()) // []byte("user=john") }) ``` > _Returned value is only valid within the handler....(AI_HYDRA_LEO_MISSING_THE)
@gaby what about people that are still using v2 and reading the v2 documentation? This change would've saved me several minutes debugging this peculiar behavior. |
That's why we added |
@andradei Let me know if that makes sense |
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
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
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)
docs/api/ctx.md (1)
242-243
: Suggest adding missing article for clarity
Each of these note blocks would read more naturally with an initial "The". For example, change:> _Returned value is only valid within the handler. Do not store any references._
to:
> _The returned value is only valid within the handler. Do not store any references._
This small tweak improves readability and grammatical correctness.
Also applies to: 262-263, 322-323, 492-493, 582-583, 618-619, 629-630, 653-654, 664-665, 710-711, 1057-1058, 1106-1107, 1283-1284
🧰 Tools
🪛 LanguageTool
[uncategorized] ~242-~242: Possible missing article found.
Context: ...aw()) // []byte("user=john") }) ``` > _Returned value is only valid within the handler....(AI_HYDRA_LEO_MISSING_THE)
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
docs/api/ctx.md
(17 hunks)
🧰 Additional context used
🪛 LanguageTool
docs/api/ctx.md
[uncategorized] ~242-~242: Possible missing article found.
Context: ...aw()) // []byte("user=john") }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~262-~262: Possible missing article found.
Context: ...dy()) // []byte("user=john") }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~322-~322: Possible missing article found.
Context: ...lhost:3000/?name=john&pass=doe" ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~492-~492: Possible missing article found.
Context: ...y", "doe") // "doe" // ... }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~582-~582: Possible missing article found.
Context: ... or "" if not exist // .. }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~618-~618: Possible missing article found.
Context: ..., "john") // "john" // .. }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~629-~629: Possible missing article found.
Context: ...eqHeaders() map[string][]string ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~653-~653: Possible missing article found.
Context: ..., "john") // "john" // .. }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~664-~664: Possible missing article found.
Context: ...spHeaders() map[string][]string ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~710-~710: Possible missing article found.
Context: ...() // "google.com" // ... }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~1057-~1057: Possible missing article found.
Context: ...earch?q=something" // ... }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~1106-~1106: Possible missing article found.
Context: ...f the first wildcard segment }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
[uncategorized] ~1283-~1283: Possible missing article found.
Context: ... "nike") // "nike" // ... }) ``` > _Returned value is only valid within the handler....
(AI_HYDRA_LEO_MISSING_THE)
🔇 Additional comments (2)
docs/api/ctx.md (2)
60-60
: Skip trivial example change
The update on this example line is a minor formatting/whitespace adjustment and does not affect the documentation's correctness or clarity.
1447-1461
: Great addition: caution on HTTP method preservation during redirects
The new:::caution
block accurately warns users about browsers potentially changing POST to GET on a 302 redirect and recommends 303, 307, or 308 to preserve the original method. This enhances clarity for v2 users.
I do not understand why the CI is running. |
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 documentation of Ctx.Redirect in v2 branch after solutions decided in #3405.
Closes #3405