func (router *Router) Before(pattern string, midwares ...func(*Context)) {
	exist, node := router.trie.GetNode(pattern)
	if exist {
		if beforeHooks, ok := node.Data["_before_hooks"]; ok {
			hooks := beforeHooks.([]func(*Context))
			node.Data["_before_hooks"] = append(hooks, midwares...)
			return
		}
		node.Data["_before_hooks"] = midwares
		return
	}
}
Before binds midwares to a specific pattern. when a HTTP who's URL is matched with
this pattern, call these midwares at first.
package router
import (
	"fmt"
	"net/http"
	"strconv"
	"github.com/importcjj/trie-go"
)
const (
	MethodGet    = "GET"
	MethodPost   = "POST"
	MethodPut    = "PUT"
	MethodPatch  = "PATCH"
	MethodDelete = "DELETE"
)
type Router struct {
	trie     *trie.Trie
	handlers map[string]*Handler
}
func New() *Router {
	return &Router{
		trie: trie.New(),
	}
}
func (router *Router) Router(pattern string, handler HandlerInterface) {
	router.trie.Put(pattern, handler)
}