fix: remove extra spaces from the describe output
Ensure that the values for maps and slices are aligned with the string values. Signed-off-by: Lucas Roesler <roesler.lucas@gmail.com>
This commit is contained in:
committed by
Alex Ellis
parent
ece60be517
commit
f3f2eadcf6
@@ -222,12 +222,12 @@ func printMap(w io.Writer, name string, m map[string]string, verbose bool) {
|
||||
fmt.Fprintf(w, name+":")
|
||||
|
||||
if len(m) == 0 {
|
||||
fmt.Fprintln(w, " \t <none>")
|
||||
fmt.Fprintln(w, "\t <none>")
|
||||
return
|
||||
}
|
||||
|
||||
for key, value := range m {
|
||||
fmt.Fprintln(w, " \t "+key+": "+value)
|
||||
fmt.Fprintln(w, "\t "+key+": "+value)
|
||||
}
|
||||
|
||||
return
|
||||
@@ -241,12 +241,12 @@ func printList(w io.Writer, name string, data []string, verbose bool) {
|
||||
fmt.Fprintf(w, name+":")
|
||||
|
||||
if len(data) == 0 {
|
||||
fmt.Fprintln(w, " \t <none>")
|
||||
fmt.Fprintln(w, "\t <none>")
|
||||
return
|
||||
}
|
||||
|
||||
for _, value := range data {
|
||||
fmt.Fprintln(w, " \t - "+value)
|
||||
fmt.Fprintln(w, "\t - "+value)
|
||||
}
|
||||
|
||||
return
|
||||
@@ -260,12 +260,12 @@ func printResources(w io.Writer, name string, data *types.FunctionResources, ver
|
||||
fmt.Fprintf(w, name+":")
|
||||
|
||||
if data == nil {
|
||||
fmt.Fprintln(w, " \t <none>")
|
||||
fmt.Fprintln(w, "\t <none>")
|
||||
return
|
||||
}
|
||||
|
||||
fmt.Fprintln(w, " \t CPU: "+data.CPU)
|
||||
fmt.Fprintln(w, " \t Memory: "+data.Memory)
|
||||
fmt.Fprintln(w, "\t CPU: "+data.CPU)
|
||||
fmt.Fprintln(w, "\t Memory: "+data.Memory)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user