func ssi(url string) template.HTML { resp, err := http.Get(url) defer resp.Body.Close() body, err := ioutil.ReadAll(resp.Body) return template.HTML(body) } func ssiHandler(w http.ResponseWriter, r *http.Request) { funcMap := template.FuncMap { "ssi": ssi, } tmpl, err := template.New("root").Funcs(funcMap).ParseGlob("*.html") err = tmpl.ExecuteTemplate(w, "combiner.html", "") }