diff --git a/daemon/cluster/cluster.go b/daemon/cluster/cluster.go index c34d51772b57fe58f55dbb83b909f1f9698655af..19e93ef899210c98ef2b0c5d76dd54852b0f9b70 100644 --- a/daemon/cluster/cluster.go +++ b/daemon/cluster/cluster.go @@ -359,7 +359,7 @@ func (c *Cluster) errNoManager(st nodeState) error { if st.err == errSwarmCertificatesExpired { return errSwarmCertificatesExpired } - return errors.WithStack(notAvailableError("This node is not a swarm manager. Use \"docker swarm init\" or \"docker swarm join\" to connect this node to swarm and try again.")) + return errors.WithStack(notAvailableError(`This node is not a swarm manager. Use "docker swarm init" or "docker swarm join" to connect this node to swarm and try again.`)) } if st.swarmNode.Manager() != nil { return errors.WithStack(notAvailableError("This node is not a swarm manager. Manager is being prepared or has trouble connecting to the cluster.")) diff --git a/daemon/cluster/errors.go b/daemon/cluster/errors.go index 9ec716b1bac650455474117d2b1d28bba67e886b..1371b9ab521a699ec1ce69a1aa2a3abc9019e239 100644 --- a/daemon/cluster/errors.go +++ b/daemon/cluster/errors.go @@ -5,13 +5,13 @@ const ( errNoSwarm notAvailableError = "This node is not part of a swarm" // errSwarmExists is returned on initialize or join request for a cluster that has already been activated - errSwarmExists notAvailableError = "This node is already part of a swarm. Use \"docker swarm leave\" to leave this swarm and join another one." + errSwarmExists notAvailableError = `This node is already part of a swarm. Use "docker swarm leave" to leave this swarm and join another one.` // errSwarmJoinTimeoutReached is returned when cluster join could not complete before timeout was reached. - errSwarmJoinTimeoutReached notAvailableError = "Timeout was reached before node joined. The attempt to join the swarm will continue in the background. Use the \"docker info\" command to see the current swarm status of your node." + errSwarmJoinTimeoutReached notAvailableError = `Timeout was reached before node joined. The attempt to join the swarm will continue in the background. Use the "docker info" command to see the current swarm status of your node.` // errSwarmLocked is returned if the swarm is encrypted and needs a key to unlock it. - errSwarmLocked notAvailableError = "Swarm is encrypted and needs to be unlocked before it can be used. Please use \"docker swarm unlock\" to unlock it." + errSwarmLocked notAvailableError = `Swarm is encrypted and needs to be unlocked before it can be used. Please use "docker swarm unlock" to unlock it.` // errSwarmCertificatesExpired is returned if docker was not started for the whole validity period and they had no chance to renew automatically. errSwarmCertificatesExpired notAvailableError = "Swarm certificates have expired. To replace them, leave the swarm and join again." diff --git a/daemon/cluster/services.go b/daemon/cluster/services.go index dcf8e3fe9bff23cf084b6d2d7048b1450d648819..2f16f2d3a95987900146228d275a4c9ca8e6709d 100644 --- a/daemon/cluster/services.go +++ b/daemon/cluster/services.go @@ -456,7 +456,7 @@ func (c *Cluster) ServiceLogs(ctx context.Context, selector *backend.LogSelector } else { t, err := strconv.Atoi(config.Tail) if err != nil { - return nil, errors.New("tail value must be a positive integer or \"all\"") + return nil, errors.New(`tail value must be a positive integer or "all"`) } if t < 0 { return nil, errors.New("negative tail values not supported")