func (r *Router) addRoute(m, p, t string, fn Handle) {
	path := r.subPath(p)
	if len(t) > 0 && m == "GET" {
		r.index[t] = path
	}
	wf := func(w http.ResponseWriter, req *http.Request, p httprouter.Params) {
		fn(w, req, paramsFromHTTPRouter(p))
	}
	r.router.Handle(m, path, wf)
}
addRoute adds a route to the index and passes it over to the httprouter
package goat
import (
	"net/http"
	"github.com/julienschmidt/httprouter"
)
type Router struct {
	parent   *Router
	children []*Router
	prefix string
	index map[string]string
	router *httprouter.Router
	middleware []Middleware
}
type Handle func(http.ResponseWriter, *http.Request, Params)
func (r *Router) Subrouter(path string) *Router {
	sr := &Router{
		index:  make(map[string]string),
		prefix: r.subPath(path),
		router: r.router,
	}
	r.children = append(r.children, sr)
	sr.parent = r
	return sr
}