Created
August 19, 2019 15:20
-
-
Save ochaochaocha3/8a7f8c556f86dbbc1aa3fb8506c9e550 to your computer and use it in GitHub Desktop.
controllers/router.go の Setup 関数の引数を変える
This file contains 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 controllers | |
import ( | |
"github.com/labstack/echo" | |
"github.com/raa0121/GoBCDice/cmd/GoBCDiceAPI/controllers/v1" | |
) | |
// Setup sets up all controllers. | |
func Setup(e *echo.Echo) { | |
cRoot := RootController{Router: e.Router()} | |
cRoot.Setup() | |
gV1 := e.Group("/v1") | |
setupV1(gV1) | |
} | |
// setupV1 は v1/ 以下のコントローラを用意する。 | |
func setupV1(g *echo.Group) { | |
cVersion := v1.VersionController{Group: g} | |
cVersion.Setup() | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment