Better config parsing
This commit is contained in:
parent
52265e123a
commit
21c22e7121
@ -24,7 +24,7 @@ func validateConfigEntry(entry string, name string) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func LoadConfig() (*Config, error) {
|
func LoadConfig() (*Config, error) {
|
||||||
viper.SetConfigName("guildgate.yaml")
|
viper.SetConfigName("guildgate")
|
||||||
viper.AddConfigPath("/etc/")
|
viper.AddConfigPath("/etc/")
|
||||||
viper.AddConfigPath(".")
|
viper.AddConfigPath(".")
|
||||||
err := viper.ReadInConfig()
|
err := viper.ReadInConfig()
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
ldapUrl = "ldaps://identity.example.com:636"
|
ldapUrl: "ldaps://identity.example.com:636"
|
||||||
adminUser = "cn=guildgate,ou=Software"
|
adminUser: "cn=guildgate,ou=Software"
|
||||||
userAttr = "uid"
|
userAttr: "uid"
|
||||||
userOu = "ou=Users"
|
userOu: "ou=Users"
|
||||||
ldapDc = "dc=example,dc=com"
|
ldapDc: "dc=example,dc=com"
|
||||||
|
Loading…
Reference in New Issue
Block a user