示例#1
0
文件: main.go 项目: bernos/go-restapi
func configureRouting(c *config.Configuration, stack *middleware.MiddlewareStack) {
	c.Router = mux.NewRouter()
	c.Router.StrictSlash(true)

	registerSubroutes(c.Router.PathPrefix("/todos").Subrouter(), todos.Routes)

	stack.UseHandler(c.Router)
}
示例#2
0
文件: main.go 项目: bernos/go-restapi
func configureRender(c *config.Configuration, stack *middleware.MiddlewareStack) {
	c.Render = render.New()
}