mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-17 15:50:10 +00:00
Display <none> when port is empty.
This commit is contained in:
parent
1780a527f6
commit
3e389566bf
@ -1073,7 +1073,11 @@ func describeContainerBasicInfo(container api.Container, status api.ContainerSta
|
||||
if strings.Contains(portString, ",") {
|
||||
w.Write(LEVEL_2, "Ports:\t%s\n", portString)
|
||||
} else {
|
||||
w.Write(LEVEL_2, "Port:\t%s\n", portString)
|
||||
if len(portString) == 0 {
|
||||
w.Write(LEVEL_2, "Port:\t<none>\n")
|
||||
} else {
|
||||
w.Write(LEVEL_2, "Port:\t%s\n", portString)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user