Remove Redirect and PermanentRedirect functions

Use (*ResponseWriter).WriteHeader instead.
This commit is contained in:
Adnan Maolood
2020-10-31 16:51:10 -04:00
parent ca8e0166fc
commit 63b9b484d1
4 changed files with 6 additions and 16 deletions

View File

@@ -319,16 +319,6 @@ func SensitiveInput(w *ResponseWriter, r *Request, prompt string) (string, bool)
return "", false
}
// Redirect replies to the request with a redirect to the given URL.
func Redirect(w *ResponseWriter, url string) {
w.WriteHeader(StatusRedirect, url)
}
// PermanentRedirect replies to the request with a permanent redirect to the given URL.
func PermanentRedirect(w *ResponseWriter, url string) {
w.WriteHeader(StatusRedirectPermanent, url)
}
// Certificate returns the request certificate. If one is not provided,
// it returns nil and responds with StatusCertificateRequired.
func Certificate(w *ResponseWriter, r *Request) (*x509.Certificate, bool) {