Merge commit '400b008f7423c6780f4090d83083f9a35b3567a6' into ja
This commit is contained in:
@@ -135,9 +135,9 @@ Handler是一个接口,但是前一小节中的`sayhelloName`函数并没有
|
||||
|
||||
按顺序做了几件事:
|
||||
|
||||
1 调用了DefaultServerMux的HandleFunc
|
||||
1 调用了DefaultServeMux的HandleFunc
|
||||
|
||||
2 调用了DefaultServerMux的Handle
|
||||
2 调用了DefaultServeMux的Handle
|
||||
|
||||
3 往DefaultServeMux的map[string]muxEntry中增加对应的handler和路由规则
|
||||
|
||||
@@ -161,7 +161,7 @@ Handler是一个接口,但是前一小节中的`sayhelloName`函数并没有
|
||||
|
||||
8 调用handler的ServeHttp
|
||||
|
||||
9 在这个例子中,下面就进入到DefaultServerMux.ServeHttp
|
||||
9 在这个例子中,下面就进入到DefaultServeMux.ServeHttp
|
||||
|
||||
10 根据request选择handler,并且进入到这个handler的ServeHTTP
|
||||
|
||||
|
||||
Reference in New Issue
Block a user