http.Handle("/", r)这段代码可注释掉,替换成err := http.ListenAndServe(":"+port, r)。如果查看源码...

3年前 评论 仿照 Laravel 框架对 Go 路由处理器代码进行拆分