feat: initialized smtp service;
refactor: config now returns a copy of a struct to prevent editing; chore: corrected identation
This commit is contained in:
@@ -153,16 +153,16 @@ func Load() (*Config, error) {
|
||||
return &cfg, nil
|
||||
}
|
||||
|
||||
func GetConfig() *Config {
|
||||
func GetConfig() Config {
|
||||
|
||||
if config == nil {
|
||||
|
||||
|
||||
if _, err := Load(); err != nil {
|
||||
panic(err)
|
||||
}
|
||||
}
|
||||
|
||||
return config
|
||||
return *config
|
||||
}
|
||||
|
||||
var config *Config
|
||||
|
||||
Reference in New Issue
Block a user