add: 模仿gin框架
This commit is contained in:
@@ -11,7 +11,7 @@ type Engine struct {
|
||||
|
||||
// 实现Handler的ServerHTTP方法
|
||||
func (e *Engine) ServeHTTP(w http.ResponseWriter, r *http.Request) {
|
||||
switch r.RequestURI {
|
||||
switch r.URL.Path {
|
||||
case "/":
|
||||
fmt.Fprint(w, "hello handler-basic")
|
||||
case "/web":
|
||||
|
||||
Reference in New Issue
Block a user