MCPcopy Index your code
hub / github.com/belak/gitdir / loadUserConfigs

Method loadUserConfigs

config_user.go:8–23  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

6)
7
8func (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
25func (c *Config) loadUserConfig(username string) error {
26 userRepo, err := git.EnsureRepo(c.fs, "admin/user-"+username)

Callers 1

loadConfigMethod · 0.95

Calls 2

loadUserConfigMethod · 0.95
newMultiErrorFunction · 0.85

Tested by

no test coverage detected