1
0
mirror of https://github.com/docker/docs.git synced 2026-11-05 00:14:17 +03:00

Merge pull request #2306 from ngauthier/fix-host-nil-swarm-options

skip printing swarm info when host options swarm info is nil
This commit is contained in:
Nathan LeClaire
2015-11-17 16:40:51 -08:00

View File

@@ -91,7 +91,7 @@ func cmdLs(c CommandLine) error {
swarmInfo := ""
if item.SwarmOptions.Discovery != "" {
if item.SwarmOptions != nil && item.SwarmOptions.Discovery != "" {
swarmInfo = swarmMasters[item.SwarmOptions.Discovery]
if item.SwarmOptions.Master {
swarmInfo = fmt.Sprintf("%s (master)", swarmInfo)