mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Only show port name if set.
Signed-off-by: Daniel Nephin <dnephin@docker.com>
This commit is contained in:
parent
9a9fc01af8
commit
909c596fa5
1 changed files with 1 additions and 1 deletions
|
@ -141,7 +141,7 @@ func printService(out io.Writer, service swarm.Service) {
|
|||
if len(service.Endpoint.Ports) > 0 {
|
||||
fmt.Fprintln(out, "Ports:")
|
||||
for _, port := range service.Endpoint.Ports {
|
||||
fmt.Fprintf(out, " Name = %s\n", port.Name)
|
||||
ioutils.FprintfIfNotEmpty(out, " Name = %s\n", port.Name)
|
||||
fmt.Fprintf(out, " Protocol = %s\n", port.Protocol)
|
||||
fmt.Fprintf(out, " TargetPort = %d\n", port.TargetPort)
|
||||
fmt.Fprintf(out, " PublishedPort = %d\n", port.PublishedPort)
|
||||
|
|
Loading…
Reference in a new issue