MCPcopy Create free account
hub / github.com/cloudwan/gohan / loadConfig

Function loadConfig

cli/cli.go:576–596  ·  view source on GitHub ↗
(configFile string)

Source from the content-addressed store, hash-verified

574}
575
576func loadConfig(configFile string) {
577 if configFile == "" {
578 return
579 }
580 config := util.GetConfig()
581 err := config.ReadConfig(configFile)
582 if err != nil {
583 if configFile != defaultConfigFile {
584 fmt.Println(err)
585 os.Exit(1)
586 }
587 return
588 }
589 err = logger.SetUpLogging(config)
590 if err != nil {
591 fmt.Printf("Logging setup error: %s\n", err)
592 os.Exit(1)
593 return
594 }
595 log.Info("logging initialized")
596}
597
598type options struct {
599 OptArgs []string

Callers 4

getRunCommandFunction · 0.85
getTestCommandFunction · 0.85
getGraceServerCommandFunction · 0.85
cli_test.goFile · 0.85

Calls 2

ReadConfigMethod · 0.80
InfoMethod · 0.65

Tested by

no test coverage detected