Better config parsing

This commit is contained in:
stryan 2020-08-20 13:03:43 -04:00
parent 52265e123a
commit 21c22e7121
2 changed files with 6 additions and 6 deletions

View File

@ -24,7 +24,7 @@ func validateConfigEntry(entry string, name string) bool {
}
func LoadConfig() (*Config, error) {
viper.SetConfigName("guildgate.yaml")
viper.SetConfigName("guildgate")
viper.AddConfigPath("/etc/")
viper.AddConfigPath(".")
err := viper.ReadInConfig()

View File

@ -1,5 +1,5 @@
ldapUrl = "ldaps://identity.example.com:636"
adminUser = "cn=guildgate,ou=Software"
userAttr = "uid"
userOu = "ou=Users"
ldapDc = "dc=example,dc=com"
ldapUrl: "ldaps://identity.example.com:636"
adminUser: "cn=guildgate,ou=Software"
userAttr: "uid"
userOu: "ou=Users"
ldapDc: "dc=example,dc=com"