From c0940a326dfdf08e5427b40b760c5f2e7d86d05d Mon Sep 17 00:00:00 2001 From: maxupeng Date: Tue, 4 Dec 2012 16:29:57 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E9=94=99=E5=88=AB?= =?UTF-8?q?=E5=AD=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 3.4.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/3.4.md b/3.4.md index 59738931..bca74e83 100644 --- a/3.4.md +++ b/3.4.md @@ -22,7 +22,7 @@ Go在等待客户端请求里面是这样写的: 它的结构如下: type ServeMux struct { - mu sync.RWMutex //锁,由于请求设计到并发处理,因此这里需要一个锁机制 + mu sync.RWMutex //锁,由于请求涉及到并发处理,因此这里需要一个锁机制 m map[string]muxEntry // 路由规则,一个string对应一个mux实体,这里的string就是注册的路由表达式 } From 2948f20eddc4093c9da8c7ab18e7e6e8a9713e62 Mon Sep 17 00:00:00 2001 From: maxupeng Date: Tue, 4 Dec 2012 16:31:22 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E8=A7=A3=E6=9E=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 4.1.md | 1 + 1 file changed, 1 insertion(+) diff --git a/4.1.md b/4.1.md index 956de5ef..f855e196 100644 --- a/4.1.md +++ b/4.1.md @@ -45,6 +45,7 @@ http包里面有一个很简单的方式就可以获取,我们在前面web的 } func login(w http.ResponseWriter, r *http.Request) { + r.ParseForm() fmt.Println("method:", r.Method) //获取请求的方法 if r.Method == "GET" { t, _ := template.ParseFiles("login.gtpl") From b091c8dc5413b7651abe1fcc97c771ae241a812b Mon Sep 17 00:00:00 2001 From: maxupeng Date: Fri, 7 Dec 2012 17:08:22 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=9B=9E=E6=BB=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 4.1.md | 1 - 1 file changed, 1 deletion(-) diff --git a/4.1.md b/4.1.md index f855e196..956de5ef 100644 --- a/4.1.md +++ b/4.1.md @@ -45,7 +45,6 @@ http包里面有一个很简单的方式就可以获取,我们在前面web的 } func login(w http.ResponseWriter, r *http.Request) { - r.ParseForm() fmt.Println("method:", r.Method) //获取请求的方法 if r.Method == "GET" { t, _ := template.ParseFiles("login.gtpl")