Merge pull request #446 from waitingkuo/patch-1

Update 13.2md
This commit is contained in:
astaxie
2015-04-01 23:55:10 +08:00

View File

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