diff options
author | James Fargher <proglottis@gmail.com> | 2021-06-09 23:58:10 +0300 |
---|---|---|
committer | James Fargher <jfargher@gitlab.com> | 2021-06-15 08:30:30 +0300 |
commit | 07048ea21953131d5022ab3289ec695e0cce4af7 (patch) | |
tree | 5290e378a8c07027cba466f1884c2702f59979fb /cmd/gitaly-wrapper | |
parent | b541a391a9eebc7a0b85e37fcf12e8c5bf1be5e1 (diff) |
Extract typed environment variable helpers
These helpers should make parsing typed environment variables more
consistent.
Diffstat (limited to 'cmd/gitaly-wrapper')
-rw-r--r-- | cmd/gitaly-wrapper/main.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/gitaly-wrapper/main.go b/cmd/gitaly-wrapper/main.go index 1239d4503..3ac422070 100644 --- a/cmd/gitaly-wrapper/main.go +++ b/cmd/gitaly-wrapper/main.go @@ -13,6 +13,7 @@ import ( "github.com/sirupsen/logrus" "gitlab.com/gitlab-org/gitaly/v14/internal/bootstrap" + "gitlab.com/gitlab-org/gitaly/v14/internal/helper/env" "gitlab.com/gitlab-org/gitaly/v14/internal/log" "gitlab.com/gitlab-org/gitaly/v14/internal/ps" "golang.org/x/sys/unix" @@ -177,5 +178,6 @@ func pidFile() string { } func jsonLogging() bool { - return os.Getenv(envJSONLogging) == "true" + enabled, _ := env.GetBool(envJSONLogging, false) + return enabled } |