Using Render() instead of Write()

This commit is contained in:
Manu Mtz-Almeida
2015-06-04 05:25:21 +02:00
parent 92475baba6
commit 1f56e50083
9 changed files with 15 additions and 15 deletions
+1 -1
View File
@@ -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))
}