func (r *Router) notFoundHandler(w http.ResponseWriter, req *http.Request) {
	WriteError(w, 404, "404 Not Found")
}
notFoundHandler handles (as you already know) the 404 error
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
}
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)
}
func (r *Router) Get(path, title string, fn Handle) {
	r.addRoute("GET", path, title, fn)
}
func (r *Router) Post(path, title string, fn Handle) {
	r.addRoute("POST", path, title, fn)
}
func (r *Router) Delete(path, title string, fn Handle) {
	r.addRoute("DELETE", path, title, fn)
}
func (r *Router) Put(path, title string, fn Handle) {
	r.addRoute("PUT", path, title, fn)
}
func (r *Router) Options(path, title string, fn Handle) {
	r.addRoute("OPTIONS", path, title, fn)
}