()
| 214 | } |
| 215 | |
| 216 | func (c *ContainerContext) Ports() string { |
| 217 | var ports []container.PortSummary |
| 218 | for _, publisher := range c.c.Publishers { |
| 219 | var pIP netip.Addr |
| 220 | if publisher.URL != "" { |
| 221 | if p, err := netip.ParseAddr(publisher.URL); err == nil { |
| 222 | pIP = p |
| 223 | } |
| 224 | } |
| 225 | ports = append(ports, container.PortSummary{ |
| 226 | IP: pIP, |
| 227 | PrivatePort: uint16(publisher.TargetPort), |
| 228 | PublicPort: uint16(publisher.PublishedPort), |
| 229 | Type: publisher.Protocol, |
| 230 | }) |
| 231 | } |
| 232 | return formatter.DisplayablePorts(ports) |
| 233 | } |
| 234 | |
| 235 | // Labels returns a comma-separated string of labels present on the container. |
| 236 | func (c *ContainerContext) Labels() string { |
nothing calls this directly
no outgoing calls
no test coverage detected