Pārlūkot izejas kodu

add modules supports

tags/v0.9.0
jimzhan pirms 10 gadiem
vecāks
revīzija
9851f98909
1 mainītis faili ar 2 papildinājumiem un 2 dzēšanām
  1. +2
    -2
      server.go

+ 2
- 2
server.go Parādīt failu

} }


// 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"),

Notiek ielāde…
Atcelt
Saglabāt