code: func ServeTemplate(w http.ResponseWriter, name string, data map[string]interface{}) {
  	// cast the writer to the resposneWriter, get the router
  	r := w.(*responseWriter).Router
  
  	r.RLock()
  	defer r.RUnlock()
  
  	if data == nil {
  		data = map[string]interface{}{}
  	}
  
  	// append global params to the template
  	for k, v := range r.params {
  		data[k] = v
  	}
  
  	var buf bytes.Buffer
  	if err := r.views.ExecuteTemplate(&buf, name, data); err != nil {
  		panic(err)
  		return
  	}
  
  	// set the content length, type, etc
  	w.Header().Set("Content-Type", "text/html; charset=utf-8")
  	w.Write(buf.Bytes())
  }
docs: // ServeTemplate applies the named template to the specified data map and
  // writes the output to the http.ResponseWriter.