package main import ( "fmt" "net/http" ) const predefined404 = ` The page you're looking for could not be found (404)


404

The page you're looking for could not be found.


Make sure the address is correct and that the page hasn't moved.

` func serve404(w http.ResponseWriter) { w.Header().Set("Content-Type", "text/html; charset=utf-8") w.Header().Set("X-Content-Type-Options", "nosniff") w.WriteHeader(http.StatusNotFound) fmt.Fprintln(w, predefined404) }