Added shutdown method to containers.
This commit is contained in:
parent
85981e75a7
commit
40f0d7251d
5 changed files with 28 additions and 8 deletions
6
main.go
6
main.go
|
|
@ -13,7 +13,13 @@ import (
|
|||
)
|
||||
|
||||
func main() {
|
||||
// Start a new container
|
||||
c := services.NewContainer()
|
||||
defer func() {
|
||||
if err := c.Shutdown(); err != nil {
|
||||
c.Web.Logger.Fatal(err)
|
||||
}
|
||||
}()
|
||||
|
||||
// Build the router
|
||||
routes.BuildRouter(c)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue