func main() {
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
w.Header().Add("Content Type", "text/html")
templ := template.New("test")
_, er := templ.Parse(doc)
if er == nil {
fmt.Print("hello") // Here hello print two times in the console
}
})
http.ListenAndServe(":8080", nil)
}
--
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...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.