[config] make HasKey more idiomatic
This commit is contained in:
1 parent
be5e81b246
commit
4808c047ee
1 file changed
+2
-6
@@ -23,12 +23,8 @@ func HasKey(appName string, key string) bool {
|
|||||||
if err != nil {
|
if err != nil {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
for _, v := range env.Keys() {
|
_, ok := env.Get(key)
|
||||||
if v == key {
|
return ok
|
||||||
return true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//SetMany variables in the environment. If appName is empty the global config is used. If restart is true the app is restarted.
|
//SetMany variables in the environment. If appName is empty the global config is used. If restart is true the app is restarted.
|
||||||
|
|||||||
Reference in new issue
Block a user