package app import ( "net/http" "github.com/xlgmokha/x/pkg/ioc" "gitlab.com/mokhax/sparkled/app/controllers/health" "gitlab.com/mokhax/sparkled/app/controllers/sparkles" "gitlab.com/mokhax/sparkled/pkg/db" ) func init() { ioc.RegisterSingleton[db.Repository](ioc.Default, func() db.Repository { return db.NewRepository() }) ioc.RegisterSingleton[*http.ServeMux](ioc.Default, func() *http.ServeMux { return http.NewServeMux() }) ioc.Register[*sparkles.Controller](ioc.Default, func() *sparkles.Controller { return sparkles.New(ioc.MustResolve[db.Repository](ioc.Default)) }) ioc.Register[*health.Controller](ioc.Default, func() *health.Controller { return health.New() }) }