From 3520c63d94cabaa1fe7d0ba2f91ef4c0af27bf05 Mon Sep 17 00:00:00 2001 From: Wei-Ting Kuo Date: Sat, 7 Feb 2015 16:36:07 +0800 Subject: [PATCH] Update 13.2md Should use http.HandleFunc if the second argument is a function. --- zh/13.2.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zh/13.2.md b/zh/13.2.md index b5ae4b0d..4a75d31e 100644 --- a/zh/13.2.md +++ b/zh/13.2.md @@ -14,7 +14,7 @@ HTTP路由组件负责将HTTP请求交到对应的函数处理(或者是一个st fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path)) } - http.Handle("/foo", fooHandler) + http.HandleFunc("/foo", fooHandler) http.HandleFunc("/bar", func(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Hello, %q", html.EscapeString(r.URL.Path))