[config] make HasKey more idiomatic

This commit is contained in:
Alex Quick
2017-07-19 09:23:06 -04:00
parent be5e81b246
commit 4808c047ee

View File

@@ -23,12 +23,8 @@ func HasKey(appName string, key string) bool {
if err != nil {
return false
}
for _, v := range env.Keys() {
if v == key {
return true
}
}
return false
_, ok := env.Get(key)
return ok
}
//SetMany variables in the environment. If appName is empty the global config is used. If restart is true the app is restarted.