package main import ( "net/http" ) type respExampleHandler int func (hello respExampleHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) { w.Header().Set("my-http-header", "Ein beliebiger Text") w.Header().Set("Content-Type", "text/html; charset=utf-8") w.WriteHeader(http.StatusFound) w.Write([]byte("

Dies ist eine HTML-Überschrift

")) } func main() { var r respExampleHandler http.ListenAndServe("localhost:8080", r) }