|
|
@ -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) |
|
|
|
} |