Hi All,

Example to write web application 
https://golang.org/doc/articles/wiki/#tmp_10 
https://golang.org/doc/articles/wiki/final.go needs to be corrected to fix 
an error leading to 'http: multiple response.WriteHeader calls'.

In the renderTemplate() func if there is an error while exectuing the line 
templates.ExecuteTemplate(w, tmpl+".html", p) then the example suggests to 
return error using http.Error().

But we have passed ResponseWriter obj to templates.ExecuteTemplate() and 
the first call to Write on this obj will trigger an implicit 
WriteHeader(http.StatusOK). http.Error() will also write the Header and we 
get the error.


Regards,
--Madhu C S

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to