Cosmetic changes in render

This commit is contained in:
Manu Mtz-Almeida
2015-05-22 04:44:29 +02:00
parent 71bd9f4500
commit 306da81aaf
4 changed files with 13 additions and 5 deletions
+3 -1
View File
@@ -9,7 +9,9 @@ type XML struct {
Data interface{}
}
const xmlContentType = "application/xml; charset=utf-8"
func (r XML) Write(w http.ResponseWriter) error {
w.Header().Set("Content-Type", "application/xml; charset=utf-8")
w.Header().Set("Content-Type", xmlContentType)
return xml.NewEncoder(w).Encode(r.Data)
}