feat(plugins): made plugins that live outside public work

This commit is contained in:
Torkel Ödegaard
2015-11-19 16:50:17 +01:00
parent f6772bb896
commit 65a7fa320a
6 changed files with 54 additions and 13 deletions

View File

@@ -275,13 +275,11 @@ func loadSpecifedConfigFile(configFile string) {
defaultSec, err := Cfg.GetSection(section.Name())
if err != nil {
log.Error(3, "Unknown config section %s defined in %s", section.Name(), configFile)
continue
defaultSec, _ = Cfg.NewSection(section.Name())
}
defaultKey, err := defaultSec.GetKey(key.Name())
if err != nil {
log.Error(3, "Unknown config key %s defined in section %s, in file %s", key.Name(), section.Name(), configFile)
continue
defaultKey, _ = defaultSec.NewKey(key.Name(), key.Value())
}
defaultKey.SetValue(key.Value())
}