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) }
func configureLogging(c *config.Configuration, stack *middleware.MiddlewareStack) { log.SetFormatter(&log.JSONFormatter{}) log.Info("Set log formatting") stack.Use(middleware.MiddlewareFunc(LoggerMiddleware)) }