package wwwshop import ( "net/http" c "WWWShop/wwwshop/controller" u "WWWShop/wwwshop/controller/usercontroller" g "WWWShop/wwwshop/controller/groupcontroller" d "WWWShop/wwwshop/dao/database" ) type WWWShop struct {} func New() WWWShop { var self = WWWShop {}; return self; } func (self WWWShop) Init() { d.Migrate(d.DB()) user_controller := c.GenerateController(u.New()) group_controller := c.GenerateController(g.New()) http.Handle("/group", group_controller) http.Handle("/user", user_controller) http.ListenAndServe(":8080", nil) }