Created
November 7, 2019 02:50
-
-
Save manakuro/5f0ba69a795ff0002f3fd147fa77a0e4 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package router | |
import ( | |
"github.com/labstack/echo" | |
"github.com/labstack/echo/middleware" | |
"github.com/manakuro/golang-clean-architecture/interface/controller" | |
) | |
func NewRouter(e *echo.Echo, c controller.AppController) *echo.Echo { | |
e.Use(middleware.Logger()) | |
e.Use(middleware.Recover()) | |
e.GET("/users", func(context echo.Context) error { return c.GetUsers(context) }) | |
return e | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment