()
| 6 | ) |
| 7 | |
| 8 | func (c *Config) loadUserConfigs() error { |
| 9 | // Bail early if we don't need to load anything. |
| 10 | if !c.Options.UserConfigKeys && !c.Options.UserConfigRepos { |
| 11 | return nil |
| 12 | } |
| 13 | |
| 14 | errors := make([]error, 0, len(c.Users)) |
| 15 | |
| 16 | for username := range c.Users { |
| 17 | errors = append(errors, c.loadUserConfig(username)) |
| 18 | } |
| 19 | |
| 20 | // Because we want to display all the errors, we return this as a |
| 21 | // multi-error rather than bailing on the first error. |
| 22 | return newMultiError(errors...) |
| 23 | } |
| 24 | |
| 25 | func (c *Config) loadUserConfig(username string) error { |
| 26 | userRepo, err := git.EnsureRepo(c.fs, "admin/user-"+username) |
no test coverage detected