SetInitialProjectConfig sets the config all modules
(ctx context.Context, projects config.Projects)
| 41 | |
| 42 | // SetInitialProjectConfig sets the config all modules |
| 43 | func (m *Modules) SetInitialProjectConfig(ctx context.Context, projects config.Projects) error { |
| 44 | for projectID, project := range projects { |
| 45 | module, err := m.loadModule(projectID) |
| 46 | if err != nil { |
| 47 | module, err = m.newModule(project.ProjectConfig) |
| 48 | if err != nil { |
| 49 | return err |
| 50 | } |
| 51 | } |
| 52 | |
| 53 | if err := module.SetInitialProjectConfig(ctx, config.Projects{projectID: project}); err != nil { |
| 54 | return err |
| 55 | } |
| 56 | } |
| 57 | return nil |
| 58 | } |
| 59 | |
| 60 | // SetProjectConfig sets the config all modules |
| 61 | func (m *Modules) SetProjectConfig(ctx context.Context, config *config.ProjectConfig) error { |
nothing calls this directly
no test coverage detected