add close

This commit is contained in:
yanghao05
2023-06-01 11:02:10 +08:00
parent 690df80c39
commit d28d9649ed
6 changed files with 20 additions and 4 deletions

View File

@@ -14,6 +14,8 @@ type Http struct {
}
func ServeHttp() error {
defer container.Close()
return container.Container.Invoke(func(http Http) error {
for _, route := range http.Routes {
route.Register()