Browse Source

add modules supports

tags/v0.9.0
jimzhan 9 years ago
parent
commit
14c1b13f4f
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      server.go

+ 2
- 2
server.go View File

} }


// Use add the middleware module into the stack chain. // 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(modules ...func(http.Handler) http.Handler) {
self.middleware.stack = append(self.middleware.stack, modules...)
} }


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

Loading…
Cancel
Save