martini.go 对路由采用正则表达式处理,最终转化成正则表达式. 添加route对应的调用栈 按照生成,验证,添加的步骤 route := newRoute(method, pattern, handlers) route.Validate() r.appendRoute(route) martini会把任意类型的func 包装好,所以这里只要验证该类型是不是合适的func,因为一开始使用的是一个空的接口参数. func validateHandler(handler Handler) {