Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Redirect ¶
Redirect replies to the request with a redirect to url, which may be a path relative to the request path. Any non-ASCII characters in url will be percent-encoded, but existing percent encodings will not be changed.
The provided code should be in the 3xx range and is usually [StatusMovedPermanently], [StatusFound] or [StatusSeeOther].
If the Content-Type header has not been set, Redirect sets it to "text/html; charset=utf-8" and writes a small HTML body. Setting the Content-Type header to any value, including nil, disables that behavior.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.