func (r *Router) Handle(method, path string, handle Handle) {
	if path[0] != '/' {
		panic("path must begin with '/' in path '" + path + "'")
	}
	if r.trees == nil {
		r.trees = make(map[string]*node)
	}
	root := r.trees[method]
	if root == nil {
		root = new(node)
		r.trees[method] = root
	}
	root.addRoute(path, handle)
}
Handle registers a new request handle with the given path and method.

For GET, POST, PUT, PATCH and DELETE requests the respective shortcut
functions can be used.

This function is intended for bulk loading and to allow the usage of less
frequently used, non-standardized or custom methods (e.g. for internal
communication with a proxy).
package httprouter
import (
	"net/http"
)
type Handle func(http.ResponseWriter, *http.Request, Params)
type Param struct {
	Key   string
	Value string
}
type Params []Param
func (ps Params) ByName(name string) string {
	for i := range ps {
		if ps[i].Key == name {
			return ps[i].Value
		}
	}
	return ""
}
type Router struct {
	trees map[string]*node
	RedirectTrailingSlash bool
	RedirectFixedPath bool
	HandleMethodNotAllowed bool
	HandleOPTIONS bool
	NotFound http.Handler
	MethodNotAllowed http.Handler
	PanicHandler func(http.ResponseWriter, *http.Request, interface{})
}
var _ http.Handler = New()
func New() *Router {
	return &Router{
		RedirectTrailingSlash:  true,
		RedirectFixedPath:      true,
		HandleMethodNotAllowed: true,
		HandleOPTIONS:          true,
	}
}
func (r *Router) GET(path string, handle Handle) {
	r.Handle("GET", path, handle)
}
func (r *Router) HEAD(path string, handle Handle) {
	r.Handle("HEAD", path, handle)
}
func (r *Router) OPTIONS(path string, handle Handle) {
	r.Handle("OPTIONS", path, handle)
}
func (r *Router) POST(path string, handle Handle) {
	r.Handle("POST", path, handle)
}
func (r *Router) PUT(path string, handle Handle) {
	r.Handle("PUT", path, handle)
}
func (r *Router) PATCH(path string, handle Handle) {
	r.Handle("PATCH", path, handle)
}
func (r *Router) DELETE(path string, handle Handle) {
	r.Handle("DELETE", path, handle)
}