func (mx *Mux) Head(pattern string, handlerFn HandlerFunc) {
	mx.handle(mHEAD, pattern, handlerFn)
}
Head adds the route `pattern` that matches a HEAD http method to
execute the `handlerFn` phi.HandlerFunc.
package phi
import (
	"fmt"
	"strings"
	"sync"
	"github.com/valyala/fasthttp"
)
var _ Router = &Mux{}
type Mux struct {
	tree *node
	middlewares Middlewares
	inline bool
	parent *Mux
	handler Handler
	pool sync.Pool
	notFoundHandler HandlerFunc
	methodNotAllowedHandler HandlerFunc
}
func NewMux() *Mux {
	mux := &Mux{tree: &node{}}
	mux.pool.New = func() interface{} {
		return NewRouteContext()
	}
	return mux
}
func (mx *Mux) ServeFastHTTP(ctx *fasthttp.RequestCtx) {
	if mx.handler == nil {
		panic("phi: attempting to route to a mux with no handlers.")
	}
	rctx, _ := ctx.UserValue(RouteCtxKey).(*Context)
	if rctx != nil {
		mx.handler.ServeFastHTTP(ctx)
		return
	}
	rctx = mx.pool.Get().(*Context)
	rctx.Reset()
	rctx.Routes = mx
	ctx.SetUserValue(RouteCtxKey, rctx)
	mx.handler.ServeFastHTTP(ctx)
	mx.pool.Put(rctx)
}
func (mx *Mux) Use(middlewares ...Middleware) {
	if mx.handler != nil {
		panic("phi: all middlewares must be defined before routes on a mux")
	}
	mx.middlewares = append(mx.middlewares, middlewares...)
}
func (mx *Mux) Handle(pattern string, handler HandlerFunc) {
	mx.handle(mALL, pattern, handler)
}
func (mx *Mux) Method(method, pattern string, handler HandlerFunc) {
	m, ok := methodMap[strings.ToUpper(method)]
	if !ok {
		panic(fmt.Sprintf("phi: '%s' http method is not supported.", method))
	}
	mx.handle(m, pattern, handler)
}
func (mx *Mux) Connect(pattern string, handlerFn HandlerFunc) {
	mx.handle(mCONNECT, pattern, handlerFn)
}
func (mx *Mux) Delete(pattern string, handlerFn HandlerFunc) {
	mx.handle(mDELETE, pattern, handlerFn)
}
func (mx *Mux) Get(pattern string, handlerFn HandlerFunc) {
	mx.handle(mGET, pattern, handlerFn)
}