package main import ( "fmt" "net/http" ) const predefined404 = `
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) }