From 113cae5ba2a0edadadbdf8aea06a52ab6b5f0361 Mon Sep 17 00:00:00 2001 From: yuexiao-wang Date: Tue, 20 Dec 2016 19:14:41 +0800 Subject: [PATCH] Change tls to TLS Signed-off-by: yuexiao-wang --- cli/flags/common.go | 4 ++-- client/client.go | 2 +- client/client_test.go | 4 ++-- client/swarm_init.go | 2 +- client/swarm_inspect.go | 2 +- client/swarm_join.go | 2 +- client/swarm_leave.go | 2 +- client/swarm_update.go | 2 +- client/transport.go | 2 +- docs/reference/commandline/secret_ls.md | 2 +- opts/hosts.go | 2 +- 11 files changed, 13 insertions(+), 13 deletions(-) diff --git a/cli/flags/common.go b/cli/flags/common.go index 690e8da4b8..490c2922fc 100644 --- a/cli/flags/common.go +++ b/cli/flags/common.go @@ -21,7 +21,7 @@ const ( DefaultKeyFile = "key.pem" // DefaultCertFile is the default filename for the cert pem file DefaultCertFile = "cert.pem" - // FlagTLSVerify is the flag name for the tls verification option + // FlagTLSVerify is the flag name for the TLS verification option FlagTLSVerify = "tlsverify" ) @@ -73,7 +73,7 @@ func (commonOpts *CommonOptions) InstallFlags(flags *pflag.FlagSet) { // complete func (commonOpts *CommonOptions) SetDefaultOptions(flags *pflag.FlagSet) { // Regardless of whether the user sets it to true or false, if they - // specify --tlsverify at all then we need to turn on tls + // specify --tlsverify at all then we need to turn on TLS // TLSVerify can be true even if not set due to DOCKER_TLS_VERIFY env var, so we need // to check that here as well if flags.Changed(FlagTLSVerify) || commonOpts.TLSVerify { diff --git a/client/client.go b/client/client.go index 4c0f097e53..75cfc8698b 100644 --- a/client/client.go +++ b/client/client.go @@ -86,7 +86,7 @@ type Client struct { // NewEnvClient initializes a new API client based on environment variables. // Use DOCKER_HOST to set the url to the docker server. // Use DOCKER_API_VERSION to set the version of the API to reach, leave empty for latest. -// Use DOCKER_CERT_PATH to load the tls certificates from. +// Use DOCKER_CERT_PATH to load the TLS certificates from. // Use DOCKER_TLS_VERIFY to enable or disable TLS verification, off by default. func NewEnvClient() (*Client, error) { var client *http.Client diff --git a/client/client_test.go b/client/client_test.go index 3a6575c9cc..7c26403ebe 100644 --- a/client/client_test.go +++ b/client/client_test.go @@ -102,11 +102,11 @@ func TestNewEnvClient(t *testing.T) { // pedantic checking that this is handled correctly tr := apiclient.client.Transport.(*http.Transport) if tr.TLSClientConfig == nil { - t.Error("no tls config found when DOCKER_TLS_VERIFY enabled") + t.Error("no TLS config found when DOCKER_TLS_VERIFY enabled") } if tr.TLSClientConfig.InsecureSkipVerify { - t.Error("tls verification should be enabled") + t.Error("TLS verification should be enabled") } } diff --git a/client/swarm_init.go b/client/swarm_init.go index fd45d066e3..9e65e1cca4 100644 --- a/client/swarm_init.go +++ b/client/swarm_init.go @@ -7,7 +7,7 @@ import ( "golang.org/x/net/context" ) -// SwarmInit initializes the Swarm. +// SwarmInit initializes the swarm. func (cli *Client) SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error) { serverResp, err := cli.post(ctx, "/swarm/init", nil, req, nil) if err != nil { diff --git a/client/swarm_inspect.go b/client/swarm_inspect.go index 6d95cfc05e..77e72f8466 100644 --- a/client/swarm_inspect.go +++ b/client/swarm_inspect.go @@ -7,7 +7,7 @@ import ( "golang.org/x/net/context" ) -// SwarmInspect inspects the Swarm. +// SwarmInspect inspects the swarm. func (cli *Client) SwarmInspect(ctx context.Context) (swarm.Swarm, error) { serverResp, err := cli.get(ctx, "/swarm", nil, nil) if err != nil { diff --git a/client/swarm_join.go b/client/swarm_join.go index cda99930eb..19e5192b9e 100644 --- a/client/swarm_join.go +++ b/client/swarm_join.go @@ -5,7 +5,7 @@ import ( "golang.org/x/net/context" ) -// SwarmJoin joins the Swarm. +// SwarmJoin joins the swarm. func (cli *Client) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error { resp, err := cli.post(ctx, "/swarm/join", nil, req, nil) ensureReaderClosed(resp) diff --git a/client/swarm_leave.go b/client/swarm_leave.go index a4df732174..3a205cf3b5 100644 --- a/client/swarm_leave.go +++ b/client/swarm_leave.go @@ -6,7 +6,7 @@ import ( "golang.org/x/net/context" ) -// SwarmLeave leaves the Swarm. +// SwarmLeave leaves the swarm. func (cli *Client) SwarmLeave(ctx context.Context, force bool) error { query := url.Values{} if force { diff --git a/client/swarm_update.go b/client/swarm_update.go index cc8eeb6554..7245fd4e38 100644 --- a/client/swarm_update.go +++ b/client/swarm_update.go @@ -9,7 +9,7 @@ import ( "golang.org/x/net/context" ) -// SwarmUpdate updates the Swarm. +// SwarmUpdate updates the swarm. func (cli *Client) SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, flags swarm.UpdateFlags) error { query := url.Values{} query.Set("version", strconv.FormatUint(version.Index, 10)) diff --git a/client/transport.go b/client/transport.go index f04e601649..02ebadeac6 100644 --- a/client/transport.go +++ b/client/transport.go @@ -16,7 +16,7 @@ func (tf transportFunc) RoundTrip(req *http.Request) (*http.Response, error) { return tf(req) } -// resolveTLSConfig attempts to resolve the tls configuration from the +// resolveTLSConfig attempts to resolve the TLS configuration from the // RoundTripper. func resolveTLSConfig(transport http.RoundTripper) *tls.Config { switch tr := transport.(type) { diff --git a/docs/reference/commandline/secret_ls.md b/docs/reference/commandline/secret_ls.md index 6b34fc2146..c7b7f2a352 100644 --- a/docs/reference/commandline/secret_ls.md +++ b/docs/reference/commandline/secret_ls.md @@ -27,7 +27,7 @@ Options: -q, --quiet Only display IDs ``` -Run this command on a manager node to list the secrets in the Swarm. +Run this command on a manager node to list the secrets in the swarm. ## Examples diff --git a/opts/hosts.go b/opts/hosts.go index 266df1e537..1107b7209f 100644 --- a/opts/hosts.go +++ b/opts/hosts.go @@ -37,7 +37,7 @@ func ValidateHost(val string) (string, error) { } } // Note: unlike most flag validators, we don't return the mutated value here - // we need to know what the user entered later (using ParseHost) to adjust for tls + // we need to know what the user entered later (using ParseHost) to adjust for TLS return val, nil }