More cleanup, more refractor, more energy, more passion, more footwork

This commit is contained in:
Mukhtar Akere
2025-02-13 02:08:18 +01:00
parent c386495d3d
commit 14341d30bc
60 changed files with 2369 additions and 1961 deletions

View File

@@ -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