瀏覽代碼

add modules supports

tags/v0.9.0
jimzhan 9 年之前
父節點
當前提交
9851f98909
共有 1 個檔案被更改,包括 2 行新增2 行删除
  1. +2
    -2
      server.go

+ 2
- 2
server.go 查看文件

@@ -123,8 +123,8 @@ func (self *server) FileServer(prefix, dir string) {
}

// Use add the middleware module into the stack chain.
func (self *server) Use(module func(http.Handler) http.Handler) {
self.middleware.stack = append(self.middleware.stack, module)
func (self *server) Use(module ...func(http.Handler) http.Handler) {
self.middleware.stack = append(self.middleware.stack, module...)
}

// Get is a shortcut for mux.HandleFunc(pattern, handler).Methods("GET"),

Loading…
取消
儲存