diff options
author | Dean Deng <deandeng@google.com> | 2021-01-13 15:10:03 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-13 15:15:20 -0800 |
commit | 1efe0ebc5973ec8a06b881c087dae2183898504b (patch) | |
tree | 6587b91164883c87324abe602b438f3e3ace19cf /website/cmd/server | |
parent | f34aaf7ef17aa10c7ba1923d0694347e47634192 (diff) |
Switch uses of os.Getenv that check for empty string to os.LookupEnv.
Whether the variable was found is already returned by syscall.Getenv.
os.Getenv drops this value while os.Lookupenv passes it along.
PiperOrigin-RevId: 351674032
Diffstat (limited to 'website/cmd/server')
-rw-r--r-- | website/cmd/server/main.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/website/cmd/server/main.go b/website/cmd/server/main.go index 9f0092ed6..707a3a8f8 100644 --- a/website/cmd/server/main.go +++ b/website/cmd/server/main.go @@ -366,7 +366,7 @@ func registerProfile(mux *http.ServeMux) { } func envFlagString(name, def string) string { - if val := os.Getenv(name); val != "" { + if val, ok := os.LookupEnv(name); ok { return val } return def |