avoid using os.Getenv for internal code, use env.Get() instead (#17688)

This commit is contained in:
Harshavardhana
2023-07-20 07:52:49 -07:00
committed by GitHub
parent 9eeee92d36
commit e12ab486a2
7 changed files with 48 additions and 28 deletions

View File

@@ -31,6 +31,7 @@ import (
"github.com/minio/minio/internal/color"
"github.com/minio/minio/internal/logger"
"github.com/minio/pkg/console"
"github.com/minio/pkg/env"
"github.com/minio/pkg/trie"
"github.com/minio/pkg/words"
)
@@ -191,7 +192,7 @@ func Main(args []string) {
// Set the minio app name.
appName := filepath.Base(args[0])
if os.Getenv("_MINIO_DEBUG_NO_EXIT") != "" {
if env.Get("_MINIO_DEBUG_NO_EXIT", "") != "" {
freeze := func(_ int) {
// Infinite blocking op
<-make(chan struct{})