|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
// 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(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"), |
|
|
// Get is a shortcut for mux.HandleFunc(pattern, handler).Methods("GET"), |