func (r *Router) Use(handle Middleware) *Router {
	r.mds = append(r.mds, handle)
	r.middleware = Compose(r.mds...)
	return r
}
Use registers a new Middleware in the router, that will be called when router mathed.
package gear
import (
	"net/http"
	"strings"
	"github.com/teambition/trie-mux"
)
type Router struct {
	root       string
	rt         string
	trie       *trie.Trie
	otherwise  Middleware
	middleware Middleware
	mds        []Middleware
}
type RouterOptions struct {
	Root string
	IgnoreCase bool
	FixedPathRedirect bool
	TrailingSlashRedirect bool
}
var defaultRouterOptions = RouterOptions{
	Root:                  "/",
	IgnoreCase:            true,
	FixedPathRedirect:     true,
	TrailingSlashRedirect: true,
}
func NewRouter(routerOptions ...RouterOptions) *Router {
	opts := defaultRouterOptions
	if len(routerOptions) > 0 {
		opts = routerOptions[0]
	}
	if opts.Root == "" || opts.Root[len(opts.Root)-1] != '/' {
		opts.Root += "/"
	}
	return &Router{
		root: opts.Root,
		rt:   opts.Root[0 : len(opts.Root)-1],
		mds:  make([]Middleware, 0),
		trie: trie.New(trie.Options{
			IgnoreCase:            opts.IgnoreCase,
			FixedPathRedirect:     opts.FixedPathRedirect,
			TrailingSlashRedirect: opts.TrailingSlashRedirect,
		}),
	}
}