mirror of
https://github.com/minio/minio.git
synced 2025-11-09 21:49:46 -05:00
fix: Better printing of XL config init error (#5284)
This commit is contained in:
committed by
Nitish Tiwari
parent
e3d841ffd1
commit
2244adff07
12
cmd/utils.go
12
cmd/utils.go
@@ -29,6 +29,7 @@ import (
|
||||
"net/http"
|
||||
"net/url"
|
||||
"os"
|
||||
"reflect"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
@@ -132,10 +133,13 @@ func isMaxPartID(partID int) bool {
|
||||
return partID > globalMaxPartID
|
||||
}
|
||||
|
||||
func contains(stringList []string, element string) bool {
|
||||
for _, e := range stringList {
|
||||
if e == element {
|
||||
return true
|
||||
func contains(slice interface{}, elem interface{}) bool {
|
||||
v := reflect.ValueOf(slice)
|
||||
if v.Kind() == reflect.Slice {
|
||||
for i := 0; i < v.Len(); i++ {
|
||||
if v.Index(i).Interface() == elem {
|
||||
return true
|
||||
}
|
||||
}
|
||||
}
|
||||
return false
|
||||
|
||||
Reference in New Issue
Block a user