Fix logger and audit http endpoint config lookup

This commit is contained in:
Harshavardhana
2019-10-11 18:21:04 -07:00
parent 175b07d6e4
commit bd10640846
2 changed files with 22 additions and 19 deletions

5
pkg/env/env.go vendored
View File

@@ -27,7 +27,10 @@ func Lookup(key string) (string, bool) { return os.LookupEnv(key) }
func List(prefix string) (envs []string) {
for _, env := range os.Environ() {
if strings.HasPrefix(env, prefix) {
envs = append(envs, env)
values := strings.SplitN(env, "=", 2)
if len(values) == 2 {
envs = append(envs, values[0])
}
}
}
return envs