-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAge
Description
A very cool new package url was recently added to the Go standard library, see commit 1d8f822. To avoid a name collision, the existing url parameter of http.Redirect function was renamed to urlStr.
// Redirect replies to the request with a redirect to url,
// which may be a path relative to the request path.
-func Redirect(w ResponseWriter, r *Request, url string, code int) {
+func Redirect(w ResponseWriter, r *Request, urlStr string, code int) {However, it looks like you forgot to update the documentation accordingly. It should be changed as follows:
-// Redirect replies to the request with a redirect to url,
+// Redirect replies to the request with a redirect to urlStr,
// which may be a path relative to the request path.Otherwise, it's not clear which url is being referred to. One may inadvertently misinterpret it to mean r.URL, which is not the case.
(I was going through my open tabs, and noticed I forgot to hit submit on this one. Better late than never. 🤷♂️)
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAge