From 156a874d6d4830b5c4ad642c8d858349f74c06e4 Mon Sep 17 00:00:00 2001 From: Xargin Date: Wed, 8 Aug 2018 19:57:05 +0800 Subject: [PATCH] fix typo --- ch5-web/ch5-03-middleware.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) ... }