Skip to content

Commit

Permalink
Minor cleanup. (minio#3361)
Browse files Browse the repository at this point in the history
  • Loading branch information
balamurugana authored and harshavardhana committed Nov 28, 2016
1 parent 201a20a commit 9ccfb70
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion cmd/posix-utils_common.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ func hasPosixReservedPrefix(name string) (isReserved bool) {
isReserved = true
break
}
isReserved = false
}

return isReserved
}
8 changes: 4 additions & 4 deletions cmd/prepare-storage-msg.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import (
)

// 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 t < 10 {
return fmt.Sprintf("0%d/0%d", i, t)
Expand Down Expand Up @@ -111,7 +111,7 @@ func getHealMsg(endpoints []*url.URL, storageDisks []StorageAPI) string {
}
msg += fmt.Sprintf(
"\n[%s] %s - %s %s",
int2Str(i+1, len(storageDisks)),
formatInts(i+1, len(storageDisks)),
endpoints[i],
humanize.IBytes(uint64(info.Total)),
func() string {
Expand Down Expand Up @@ -141,7 +141,7 @@ func getStorageInitMsg(titleMsg string, endpoints []*url.URL, storageDisks []Sto
}
msg += fmt.Sprintf(
"\n[%s] %s - %s %s",
int2Str(i+1, len(storageDisks)),
formatInts(i+1, len(storageDisks)),
endpoints[i],
humanize.IBytes(uint64(info.Total)),
func() string {
Expand Down Expand Up @@ -178,7 +178,7 @@ func getConfigErrMsg(storageDisks []StorageAPI, sErrs []error) string {
}
msg += fmt.Sprintf(
"\n[%s] %s : %s",
int2Str(i+1, len(storageDisks)),
formatInts(i+1, len(storageDisks)),
storageDisks[i],
sErrs[i],
)
Expand Down

0 comments on commit 9ccfb70

Please sign in to comment.