diff --git a/ch5-web/ch5-03-middleware.md b/ch5-web/ch5-03-middleware.md index 2f328e1..995e6fd 100644 --- a/ch5-web/ch5-03-middleware.md +++ b/ch5-web/ch5-03-middleware.md @@ -119,7 +119,7 @@ func timeMiddleware(next http.Handler) http.Handler { } func main() { - http.HandleFunc("/", timeMiddleware(hello)) + http.Handle("/", timeMiddleware(http.HandlerFunc(hello))) err := http.ListenAndServe(":8080", nil) ... }