func (r *Router) Handle(method string, pattern string, handlers []Handler) *Route {
	if len(r.groups) > 0 {
		groupPattern := ""
		h := make([]Handler, 0)
		for _, g := range r.groups {
			groupPattern += g.pattern
			h = append(h, g.handlers...)
		}

		pattern = groupPattern + pattern
		h = append(h, handlers...)
		handlers = h
	}
	handlers = validateAndWrapHandlers(handlers, r.handlerWrapper)

	return r.handle(method, pattern, func(resp http.ResponseWriter, req *http.Request, params Params) {
		c := r.m.createContext(resp, req)
		c.params = params
		c.handlers = make([]Handler, 0, len(r.m.handlers)+len(handlers))
		c.handlers = append(c.handlers, r.m.handlers...)
		c.handlers = append(c.handlers, handlers...)
		c.run()
	})
}
func (r *Router) Handle(method string, pattern string, handlers []Handler) *Route {
	if len(r.groups) > 0 {
		groupPattern := ""
		h := make([]Handler, 0)
		for _, g := range r.groups {
			groupPattern += g.pattern
			h = append(h, g.handlers...)
		}

		pattern = groupPattern + pattern
		h = append(h, handlers...)
		handlers = h
	}
	handlers = validateAndWrapHandlers(handlers, r.handlerWrapper)

	return r.handle(method, pattern, func(resp http.ResponseWriter, req *http.Request, params Params) {
		c := r.m.createContext(resp, req)
		c.params = params
		c.handlers = make([]Handler, 0, len(r.m.handlers)+len(handlers))
		c.handlers = append(c.handlers, r.m.handlers...)
		c.handlers = append(c.handlers, handlers...)
		c.run()
	})
}
func ( r * Router ) Handle ( method string , pattern string , handlers [ ] Handler ) * Route { if len ( r . groups ) > 0 { groupPattern := " " h := make ( [ ] Handler , 0 ) for _ , g := range r . groups { groupPattern += g . pattern h = append ( h , g . handlers ... ) } pattern = groupPattern + pattern h = append ( h , handlers ... ) handlers = h } handlers = validateAndWrapHandlers ( handlers , r . handlerWrapper ) return r . handle ( method , pattern , func ( resp http . ResponseWriter , req * http . Request , params Params ) { c := r . m . createContext ( resp , req ) c . params = params c . handlers = make ( [ ] Handler , 0 , len ( r . m . handlers ) + len ( handlers ) ) c . handlers = append ( c . handlers , r . m . handlers ... ) c . handlers = append ( c . handlers , handlers ... ) c . run ( ) } ) }
// Handle registers a new request handle with the given pattern, method and handlers.
Handle registers a new request handle with the given pattern method and handlers .