package main import ( "github.com/zenazn/goji" "github.com/zenazn/goji/web" "github.com/zenazn/goji/web/middleware" _ "github.com/go-sql-driver/mysql" "gopkg.in/yaml.v2" "io/ioutil" "os" ) var db gorm.DB // main()はルーティング情報だけ記述する func main() { user := web.New() goji.Handle("/user/*", user) user.Use(middleware.SubRouter) user.Get("/index", UserIndex) user.Get("/new", UserNew) user.Post("/new", UserC