use slices package and remove some helpers (#17342)

This commit is contained in:
Harshavardhana
2023-06-06 10:12:52 -07:00
committed by GitHub
parent 5a21b1f353
commit d1448adbda
8 changed files with 42 additions and 50 deletions

View File

@@ -50,6 +50,7 @@ import (
"github.com/minio/minio/internal/logger"
"github.com/minio/pkg/certs"
"github.com/minio/pkg/env"
"golang.org/x/exp/slices"
)
// ServerFlags - server command specific flags
@@ -792,7 +793,7 @@ func serverMain(ctx *cli.Context) {
}
for _, v := range os.Environ() {
// Do not print sensitive creds in debug.
if contains(ks, strings.Split(v, "=")[0]) {
if slices.Contains(ks, strings.Split(v, "=")[0]) {
continue
}
logger.Info(v)