Code cleanup.

This commit is contained in:
mikestefanello 2021-12-12 21:28:53 -05:00
parent eb98a600e8
commit c48f6bb9f4
2 changed files with 19 additions and 20 deletions

View file

@ -25,6 +25,16 @@ type Container struct {
ORM *ent.Client
}
func NewContainer() *Container {
c := new(Container)
c.initWeb()
c.initConfig()
c.initCache()
c.initDatabase()
c.initORM()
return c
}
func (c *Container) initWeb() {
c.Web = echo.New()
}
@ -71,13 +81,3 @@ func (c *Container) initORM() {
c.Web.Logger.Fatalf("failed to create database schema: %v", err)
}
}
func NewContainer() *Container {
c := new(Container)
c.initWeb()
c.initConfig()
c.initCache()
c.initDatabase()
c.initORM()
return c
}