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 XML struct {
var xmlContentType = []string{"application/xml; charset=utf-8"}
func (r XML) Write(w http.ResponseWriter) error {
func (r XML) Render(w http.ResponseWriter) error {
w.Header()["Content-Type"] = xmlContentType
return xml.NewEncoder(w).Encode(r.Data)
}