mirror of
https://github.com/minio/minio.git
synced 2025-01-11 23:13:23 -05:00
Minor cleanup. (#3361)
This commit is contained in:
parent
201a20ac02
commit
9ccfb70104
@ -31,7 +31,7 @@ func hasPosixReservedPrefix(name string) (isReserved bool) {
|
|||||||
isReserved = true
|
isReserved = true
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
isReserved = false
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return isReserved
|
return isReserved
|
||||||
}
|
}
|
||||||
|
@ -27,7 +27,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
// Helper to generate integer sequences into a friendlier user consumable format.
|
// Helper to generate integer sequences into a friendlier user consumable format.
|
||||||
func int2Str(i int, t int) string {
|
func formatInts(i int, t int) string {
|
||||||
if i < 10 {
|
if i < 10 {
|
||||||
if t < 10 {
|
if t < 10 {
|
||||||
return fmt.Sprintf("0%d/0%d", i, t)
|
return fmt.Sprintf("0%d/0%d", i, t)
|
||||||
@ -111,7 +111,7 @@ func getHealMsg(endpoints []*url.URL, storageDisks []StorageAPI) string {
|
|||||||
}
|
}
|
||||||
msg += fmt.Sprintf(
|
msg += fmt.Sprintf(
|
||||||
"\n[%s] %s - %s %s",
|
"\n[%s] %s - %s %s",
|
||||||
int2Str(i+1, len(storageDisks)),
|
formatInts(i+1, len(storageDisks)),
|
||||||
endpoints[i],
|
endpoints[i],
|
||||||
humanize.IBytes(uint64(info.Total)),
|
humanize.IBytes(uint64(info.Total)),
|
||||||
func() string {
|
func() string {
|
||||||
@ -141,7 +141,7 @@ func getStorageInitMsg(titleMsg string, endpoints []*url.URL, storageDisks []Sto
|
|||||||
}
|
}
|
||||||
msg += fmt.Sprintf(
|
msg += fmt.Sprintf(
|
||||||
"\n[%s] %s - %s %s",
|
"\n[%s] %s - %s %s",
|
||||||
int2Str(i+1, len(storageDisks)),
|
formatInts(i+1, len(storageDisks)),
|
||||||
endpoints[i],
|
endpoints[i],
|
||||||
humanize.IBytes(uint64(info.Total)),
|
humanize.IBytes(uint64(info.Total)),
|
||||||
func() string {
|
func() string {
|
||||||
@ -178,7 +178,7 @@ func getConfigErrMsg(storageDisks []StorageAPI, sErrs []error) string {
|
|||||||
}
|
}
|
||||||
msg += fmt.Sprintf(
|
msg += fmt.Sprintf(
|
||||||
"\n[%s] %s : %s",
|
"\n[%s] %s : %s",
|
||||||
int2Str(i+1, len(storageDisks)),
|
formatInts(i+1, len(storageDisks)),
|
||||||
storageDisks[i],
|
storageDisks[i],
|
||||||
sErrs[i],
|
sErrs[i],
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user