diff --git a/main.go b/main.go index 05994c1..1b84590 100644 --- a/main.go +++ b/main.go @@ -8,9 +8,14 @@ import ( func main() { http.HandleFunc("/hello", HelloHTTP) + http.HandleFunc("/", NotFound) log.Fatal(http.ListenAndServe(":8080", nil)) } func HelloHTTP(w http.ResponseWriter, req *http.Request) { fmt.Fprint(w, "Hello HTTP") } + +func NotFound(w http.ResponseWriter, req *http.Request) { + http.NotFound(w, req) +}