minor refactoring of @tbflw work

This commit is contained in:
Julien Neuhart
2019-06-21 13:32:46 +02:00
parent 97eff7f21d
commit 8ca9866440
10 changed files with 33 additions and 34 deletions

View File

@@ -50,7 +50,9 @@ func mustParseEnvVar() *api.Options {
}
opts.DefaultListenPort = v
}
//checkBoolEnv is a convenience function for reading an env var with a bool value where `1` is true and `0` is false
// checkBoolEnv is a convenience function for reading
// an env var with a bool value where
// `1` is true and `0` is false.
checkBoolEnv := func(name string) bool {
if v, ok := os.LookupEnv(name); ok {
if v != "1" && v != "0" {