Change to using yml for configuration files

This commit is contained in:
Dane Everitt
2017-09-30 17:25:04 -05:00
parent 5ed3bb2a0c
commit 256c566dfe
13 changed files with 70 additions and 18 deletions

View File

@@ -10,6 +10,7 @@ func LoadConfiguration(path string) error {
viper.SetConfigFile(path)
} else {
viper.AddConfigPath("./")
viper.SetConfigType("yaml")
viper.SetConfigName("config")
}
@@ -49,7 +50,7 @@ func setDefaults() {
// ContainsAuthKey checks wether the config contains a specified authentication key
func ContainsAuthKey(key string) bool {
for _, k := range viper.GetStringSlice(AuthKeys) {
for _, k := range viper.GetStringSlice(AuthKey) {
if k == key {
return true
}