Merge pull request #4682 from dokku/better-report-output
Properly space report output
This commit is contained in:
@@ -378,11 +378,18 @@ func ReportSingleApp(reportType string, appName string, infoFlag string, infoFla
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
length := 0
|
||||||
flags := []string{}
|
flags := []string{}
|
||||||
for key := range infoFlags {
|
for key := range infoFlags {
|
||||||
|
if len(key) > length {
|
||||||
|
length = len(key)
|
||||||
|
}
|
||||||
flags = append(flags, key)
|
flags = append(flags, key)
|
||||||
}
|
}
|
||||||
sort.Strings(flags)
|
sort.Strings(flags)
|
||||||
|
if length < 31 {
|
||||||
|
length = 31
|
||||||
|
}
|
||||||
|
|
||||||
if len(infoFlag) == 0 {
|
if len(infoFlag) == 0 {
|
||||||
LogInfo2Quiet(fmt.Sprintf("%s %v information", appName, reportType))
|
LogInfo2Quiet(fmt.Sprintf("%s %v information", appName, reportType))
|
||||||
@@ -403,7 +410,7 @@ func ReportSingleApp(reportType string, appName string, infoFlag string, infoFla
|
|||||||
key = UcFirst(key)
|
key = UcFirst(key)
|
||||||
}
|
}
|
||||||
|
|
||||||
LogVerbose(fmt.Sprintf("%s%s", RightPad(fmt.Sprintf("%s:", key), 31, " "), v))
|
LogVerbose(fmt.Sprintf("%s%s", RightPad(fmt.Sprintf("%s:", key), length, " "), v))
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user