Fix bug where configuration is being overridden by a default configuration

This commit is contained in:
Ryan Cavicchioni 2021-04-04 22:53:35 +00:00
parent e66f6358a9
commit a4c305c2e9
Signed by: ryanc
GPG Key ID: 877EEDAF9245103D

View File

@ -87,8 +87,6 @@ func LoadConfig(s string) (*Config, error) {
var err error
var c *Config = GetConfig()
*c = DefaultConfig
if _, err := toml.Decode(s, &c); err != nil {
err = fmt.Errorf("fatal: failed to parse; %w", err)
}
@ -101,8 +99,6 @@ func LoadConfigFile(configPath string) (*Config, error) {
var c *Config = GetConfig()
*c = DefaultConfig
if _, err := toml.DecodeFile(configPath, &c); err != nil {
err = fmt.Errorf("fatal: failed to parse %s; %w", configPath, err)
}