diff --git a/daemon/cluster/cluster.go b/daemon/cluster/cluster.go index c34d51772b..19e93ef899 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 9ec716b1ba..1371b9ab52 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 dcf8e3fe9b..2f16f2d3a9 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")