diff options
author | Sebastiaan van Stijn <github@gone.nl> | 2022-07-04 10:07:58 +0200 |
---|---|---|
committer | Cory Snider <csnider@mirantis.com> | 2023-02-24 17:05:41 -0500 |
commit | 2461d88305974822c5829a744a30a297a740a83f (patch) | |
tree | ed8f339165a65af64bcfaaaa0d65ac78c93992b8 | |
parent | 063042449ec8d356d6948052e4d80e9a676cb065 (diff) | |
download | docker-2461d88305974822c5829a744a30a297a740a83f.tar.gz |
linting: error strings should not be capitalized (revive)
client/request.go:183:28: error-strings: error strings should not be capitalized or end with punctuation or a newline (revive)
err = errors.Wrap(err, "In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.")
^
client/request.go:186:28: error-strings: error strings should not be capitalized or end with punctuation or a newline (revive)
err = errors.Wrap(err, "This error may indicate that the docker daemon is not running.")
^
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 10c56efa9730cc84274593de89c4cc90cbc83ae6)
Signed-off-by: Cory Snider <csnider@mirantis.com>
-rw-r--r-- | client/request.go | 8 | ||||
-rw-r--r-- | daemon/network.go | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/client/request.go b/client/request.go index f07a6cade6..d3d9a3fe64 100644 --- a/client/request.go +++ b/client/request.go @@ -128,7 +128,7 @@ func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResp } if cli.scheme == "https" && strings.Contains(err.Error(), "bad certificate") { - return serverResp, errors.Wrap(err, "The server probably has client authentication (--tlsverify) enabled. Please check your TLS client certification settings") + return serverResp, errors.Wrap(err, "the server probably has client authentication (--tlsverify) enabled; check your TLS client certification settings") } // Don't decorate context sentinel errors; users may be comparing to @@ -140,7 +140,7 @@ func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResp if nErr, ok := err.(*url.Error); ok { if nErr, ok := nErr.Err.(*net.OpError); ok { if os.IsPermission(nErr.Err) { - return serverResp, errors.Wrapf(err, "Got permission denied while trying to connect to the Docker daemon socket at %v", cli.host) + return serverResp, errors.Wrapf(err, "permission denied while trying to connect to the Docker daemon socket at %v", cli.host) } } } @@ -167,10 +167,10 @@ func (cli *Client) doRequest(ctx context.Context, req *http.Request) (serverResp if strings.Contains(err.Error(), `open //./pipe/docker_engine`) { // Checks if client is running with elevated privileges if f, elevatedErr := os.Open("\\\\.\\PHYSICALDRIVE0"); elevatedErr == nil { - err = errors.Wrap(err, "In the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect.") + err = errors.Wrap(err, "in the default daemon configuration on Windows, the docker client must be run with elevated privileges to connect") } else { f.Close() - err = errors.Wrap(err, "This error may indicate that the docker daemon is not running.") + err = errors.Wrap(err, "this error may indicate that the docker daemon is not running") } } diff --git a/daemon/network.go b/daemon/network.go index 2cc84e4a00..0fcaf4d809 100644 --- a/daemon/network.go +++ b/daemon/network.go @@ -356,7 +356,7 @@ func (daemon *Daemon) createNetwork(create types.NetworkCreateRequest, id string if agent && driver == "overlay" { nodeIP, exists := daemon.GetAttachmentStore().GetIPForNetwork(id) if !exists { - return nil, fmt.Errorf("Failed to find a load balancer IP to use for network: %v", id) + return nil, fmt.Errorf("failed to find a load balancer IP to use for network: %v", id) } nwOptions = append(nwOptions, libnetwork.NetworkOptionLBEndpoint(nodeIP)) |