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
@@ -17,7 +17,7 @@ type String struct {
var plainContentType = []string{"text/plain; charset=utf-8"}
func (r String) Write(w http.ResponseWriter) error {
func (r String) Render(w http.ResponseWriter) error {
header := w.Header()
if _, exist := header["Content-Type"]; !exist {
header["Content-Type"] = plainContentType