// Compile assembles the list of handlers into a
// single handler chain.
Compile assembles the list of handlers into a
single handler chain.
// Compile assembles the list of handlers into a // single handler chain .
func (h Handlers) Compile() Handler {
	var midware []Middleware
	for _, midhandler := range h {
		midware = append(midware, wrapHandler(midhandler))
	}
	var next Handler = nopHandler{}
	for i := len(midware) - 1; i >= 0; i-- {
		next = midware[i](next)
	}
	return next
}
func ( h Handlers ) Compile ( ) Handler { var midware [ ] Middleware for _ , midhandler := range h { midware = append ( midware , wrapHandler ( midhandler ) ) } var next Handler = nopHandler { } for i := len ( midware ) - 1 ; i >= 0 ; i -- { next = midware [ i ] ( next ) } return next }
Compile assembles the list of handlers into a
single handler chain.
Compile assembles the list of handlers into a single handler chain .