We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 80965a3 + 909c596 commit 8a0acaaCopy full SHA for 8a0acaa
api/client/service/inspect.go
@@ -141,7 +141,7 @@ func printService(out io.Writer, service swarm.Service) {
141
if len(service.Endpoint.Ports) > 0 {
142
fmt.Fprintln(out, "Ports:")
143
for _, port := range service.Endpoint.Ports {
144
- fmt.Fprintf(out, " Name = %s\n", port.Name)
+ ioutils.FprintfIfNotEmpty(out, " Name = %s\n", port.Name)
145
fmt.Fprintf(out, " Protocol = %s\n", port.Protocol)
146
fmt.Fprintf(out, " TargetPort = %d\n", port.TargetPort)
147
fmt.Fprintf(out, " PublishedPort = %d\n", port.PublishedPort)
0 commit comments