Skip to content

Instantly share code, notes, and snippets.

@ochaochaocha3
Created August 19, 2019 15:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ochaochaocha3/8a7f8c556f86dbbc1aa3fb8506c9e550 to your computer and use it in GitHub Desktop.
Save ochaochaocha3/8a7f8c556f86dbbc1aa3fb8506c9e550 to your computer and use it in GitHub Desktop.
controllers/router.go の Setup 関数の引数を変える
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