parent
6000712803
commit
11e8f3a88d
@ -702,15 +702,16 @@ func printCronJobList(list *batch.CronJobList, options printers.PrintOptions) ([
|
|||||||
// `wide` indicates whether the returned value is meant for --o=wide output. If not, it's clipped to 16 bytes.
|
// `wide` indicates whether the returned value is meant for --o=wide output. If not, it's clipped to 16 bytes.
|
||||||
func loadBalancerStatusStringer(s api.LoadBalancerStatus, wide bool) string {
|
func loadBalancerStatusStringer(s api.LoadBalancerStatus, wide bool) string {
|
||||||
ingress := s.Ingress
|
ingress := s.Ingress
|
||||||
result := []string{}
|
result := sets.NewString()
|
||||||
for i := range ingress {
|
for i := range ingress {
|
||||||
if ingress[i].IP != "" {
|
if ingress[i].IP != "" {
|
||||||
result = append(result, ingress[i].IP)
|
result.Insert(ingress[i].IP)
|
||||||
} else if ingress[i].Hostname != "" {
|
} else if ingress[i].Hostname != "" {
|
||||||
result = append(result, ingress[i].Hostname)
|
result.Insert(ingress[i].Hostname)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
r := strings.Join(result, ",")
|
|
||||||
|
r := strings.Join(result.List(), ",")
|
||||||
if !wide && len(r) > loadBalancerWidth {
|
if !wide && len(r) > loadBalancerWidth {
|
||||||
r = r[0:(loadBalancerWidth-3)] + "..."
|
r = r[0:(loadBalancerWidth-3)] + "..."
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user