More cleanup, more refractor, more energy, more passion, more footwork
This commit is contained in:
@@ -113,9 +113,9 @@ func (c *Config) loadConfig() error {
|
||||
// Load the auth file
|
||||
c.Auth = c.GetAuth()
|
||||
|
||||
// Validate the config
|
||||
//Validate the config
|
||||
//if err := validateConfig(c); err != nil {
|
||||
// return nil, err
|
||||
// return err
|
||||
//}
|
||||
|
||||
return nil
|
||||
@@ -211,7 +211,11 @@ func GetConfig() *Config {
|
||||
once.Do(func() {
|
||||
instance = &Config{} // Initialize instance first
|
||||
if err := instance.loadConfig(); err != nil {
|
||||
panic(err)
|
||||
_, err := fmt.Fprintf(os.Stderr, "Configuration Error: %v\n", err)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
os.Exit(1)
|
||||
}
|
||||
})
|
||||
return instance
|
||||
|
||||
Reference in New Issue
Block a user