From 4808c047ee3b8291aa9a0de6aab2a0f53f689819 Mon Sep 17 00:00:00 2001 From: Alex Quick Date: Wed, 19 Jul 2017 09:23:06 -0400 Subject: [PATCH] [config] make HasKey more idiomatic --- plugins/config/config.go | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/plugins/config/config.go b/plugins/config/config.go index 17785b337..8aed5174e 100644 --- a/plugins/config/config.go +++ b/plugins/config/config.go @@ -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.