ENV vars to uppercase

This commit is contained in:
Hendrik Schlehlein 2019-02-03 19:22:59 +01:00
parent eddc32a157
commit 2089963e9e

View file

@ -82,12 +82,12 @@ func defaults() Config {
}
func (config *Config) overrideWithEnv() {
username := os.Getenv("ts3_name")
password := os.Getenv("ts3_pw")
tsIP := os.Getenv("ts3_ip")
tsPort, _ := strconv.Atoi(os.Getenv("ts3_port"))
tsQuery, _ := strconv.Atoi(os.Getenv("ts3_query"))
webPort, _ := strconv.Atoi(os.Getenv("web_port"))
username := os.Getenv("TS3_NAME")
password := os.Getenv("TS3_PW")
tsIP := os.Getenv("TS3_IP")
tsPort, _ := strconv.Atoi(os.Getenv("TS3_PORT"))
tsQuery, _ := strconv.Atoi(os.Getenv("TS3_QUERY"))
webPort, _ := strconv.Atoi(os.Getenv("WEB_PORT"))
if username != "" {
config.User.Name = username