Reverse order of RedirectHandler arguments
This commit is contained in:
parent
b5a3c0adc5
commit
3d6ac90e08
@ -39,13 +39,13 @@ func (f HandlerFunc) ServeGemini(w ResponseWriter, r *Request) {
|
|||||||
//
|
//
|
||||||
// The provided code should be in the 3x range and is usually
|
// The provided code should be in the 3x range and is usually
|
||||||
// StatusRedirect or StatusPermanentRedirect.
|
// StatusRedirect or StatusPermanentRedirect.
|
||||||
func RedirectHandler(url string, code int) Handler {
|
func RedirectHandler(code int, url string) Handler {
|
||||||
return &redirectHandler{url, code}
|
return &redirectHandler{code, url}
|
||||||
}
|
}
|
||||||
|
|
||||||
type redirectHandler struct {
|
type redirectHandler struct {
|
||||||
url string
|
|
||||||
code int
|
code int
|
||||||
|
url string
|
||||||
}
|
}
|
||||||
|
|
||||||
func (h *redirectHandler) ServeGemini(w ResponseWriter, r *Request) {
|
func (h *redirectHandler) ServeGemini(w ResponseWriter, r *Request) {
|
||||||
|
Loading…
Reference in New Issue
Block a user