Modules returns all modules in the container. This method is used to scan for custom interfaces. For example, The database module use Modules to scan for database migrations. * m.container.Modules().Filter(func(p MigrationProvider) { for _, migration := range p.ProvideMigration() { if migratio
()
| 30 | }) |
| 31 | */ |
| 32 | func (c *Container) Modules() []interface{} { |
| 33 | return c.modules |
| 34 | } |
| 35 | |
| 36 | func (c *Container) AddModule(module interface{}) { |
| 37 | c.modules = append(c.modules, module) |
no outgoing calls