MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / doLoadConfigs

Method doLoadConfigs

cli/pkg/ssh_config/config.go:251–279  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

249}
250
251func (u *UserSettings) doLoadConfigs() {
252 u.loadConfigs.Do(func() {
253 // can't parse user file, that's ok.
254 var filename string
255 if u.userConfigFinder == nil {
256 filename = userConfigFinder()
257 } else {
258 filename = u.userConfigFinder()
259 }
260 var err error
261 u.userConfig, err = parseFile(filename)
262 //lint:ignore S1002 I prefer it this way
263 if err != nil && os.IsNotExist(err) == false {
264 u.onceErr = err
265 return
266 }
267 if u.systemConfigFinder == nil {
268 filename = systemConfigFinder()
269 } else {
270 filename = u.systemConfigFinder()
271 }
272 u.systemConfig, err = parseFile(filename)
273 //lint:ignore S1002 I prefer it this way
274 if err != nil && os.IsNotExist(err) == false {
275 u.onceErr = err
276 return
277 }
278 })
279}
280
281func parseFile(filename string) (*Config, error) {
282 return parseWithDepth(filename, 0)

Callers 2

GetStrictMethod · 0.95
GetAllStrictMethod · 0.95

Calls 4

userConfigFinderFunction · 0.85
parseFileFunction · 0.85
systemConfigFinderFunction · 0.85
DoMethod · 0.80

Tested by

no test coverage detected