Using Render() instead of Write()
This commit is contained in:
+1
-1
@@ -15,7 +15,7 @@ type Redirect struct {
|
||||
Location string
|
||||
}
|
||||
|
||||
func (r Redirect) Write(w http.ResponseWriter) error {
|
||||
func (r Redirect) Render(w http.ResponseWriter) error {
|
||||
if r.Code < 300 || r.Code > 308 {
|
||||
panic(fmt.Sprintf("Cannot redirect with status code %d", r.Code))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user