Browse code

Change tls to TLS

Signed-off-by: yuexiao-wang <wang.yuexiao@zte.com.cn>

yuexiao-wang authored on 2016/12/20 20:14:41
Showing 11 changed files
... ...
@@ -21,7 +21,7 @@ const (
21 21
 	DefaultKeyFile = "key.pem"
22 22
 	// DefaultCertFile is the default filename for the cert pem file
23 23
 	DefaultCertFile = "cert.pem"
24
-	// FlagTLSVerify is the flag name for the tls verification option
24
+	// FlagTLSVerify is the flag name for the TLS verification option
25 25
 	FlagTLSVerify = "tlsverify"
26 26
 )
27 27
 
... ...
@@ -73,7 +73,7 @@ func (commonOpts *CommonOptions) InstallFlags(flags *pflag.FlagSet) {
73 73
 // complete
74 74
 func (commonOpts *CommonOptions) SetDefaultOptions(flags *pflag.FlagSet) {
75 75
 	// Regardless of whether the user sets it to true or false, if they
76
-	// specify --tlsverify at all then we need to turn on tls
76
+	// specify --tlsverify at all then we need to turn on TLS
77 77
 	// TLSVerify can be true even if not set due to DOCKER_TLS_VERIFY env var, so we need
78 78
 	// to check that here as well
79 79
 	if flags.Changed(FlagTLSVerify) || commonOpts.TLSVerify {
... ...
@@ -86,7 +86,7 @@ type Client struct {
86 86
 // NewEnvClient initializes a new API client based on environment variables.
87 87
 // Use DOCKER_HOST to set the url to the docker server.
88 88
 // Use DOCKER_API_VERSION to set the version of the API to reach, leave empty for latest.
89
-// Use DOCKER_CERT_PATH to load the tls certificates from.
89
+// Use DOCKER_CERT_PATH to load the TLS certificates from.
90 90
 // Use DOCKER_TLS_VERIFY to enable or disable TLS verification, off by default.
91 91
 func NewEnvClient() (*Client, error) {
92 92
 	var client *http.Client
... ...
@@ -102,11 +102,11 @@ func TestNewEnvClient(t *testing.T) {
102 102
 			// pedantic checking that this is handled correctly
103 103
 			tr := apiclient.client.Transport.(*http.Transport)
104 104
 			if tr.TLSClientConfig == nil {
105
-				t.Error("no tls config found when DOCKER_TLS_VERIFY enabled")
105
+				t.Error("no TLS config found when DOCKER_TLS_VERIFY enabled")
106 106
 			}
107 107
 
108 108
 			if tr.TLSClientConfig.InsecureSkipVerify {
109
-				t.Error("tls verification should be enabled")
109
+				t.Error("TLS verification should be enabled")
110 110
 			}
111 111
 		}
112 112
 
... ...
@@ -7,7 +7,7 @@ import (
7 7
 	"golang.org/x/net/context"
8 8
 )
9 9
 
10
-// SwarmInit initializes the Swarm.
10
+// SwarmInit initializes the swarm.
11 11
 func (cli *Client) SwarmInit(ctx context.Context, req swarm.InitRequest) (string, error) {
12 12
 	serverResp, err := cli.post(ctx, "/swarm/init", nil, req, nil)
13 13
 	if err != nil {
... ...
@@ -7,7 +7,7 @@ import (
7 7
 	"golang.org/x/net/context"
8 8
 )
9 9
 
10
-// SwarmInspect inspects the Swarm.
10
+// SwarmInspect inspects the swarm.
11 11
 func (cli *Client) SwarmInspect(ctx context.Context) (swarm.Swarm, error) {
12 12
 	serverResp, err := cli.get(ctx, "/swarm", nil, nil)
13 13
 	if err != nil {
... ...
@@ -5,7 +5,7 @@ import (
5 5
 	"golang.org/x/net/context"
6 6
 )
7 7
 
8
-// SwarmJoin joins the Swarm.
8
+// SwarmJoin joins the swarm.
9 9
 func (cli *Client) SwarmJoin(ctx context.Context, req swarm.JoinRequest) error {
10 10
 	resp, err := cli.post(ctx, "/swarm/join", nil, req, nil)
11 11
 	ensureReaderClosed(resp)
... ...
@@ -6,7 +6,7 @@ import (
6 6
 	"golang.org/x/net/context"
7 7
 )
8 8
 
9
-// SwarmLeave leaves the Swarm.
9
+// SwarmLeave leaves the swarm.
10 10
 func (cli *Client) SwarmLeave(ctx context.Context, force bool) error {
11 11
 	query := url.Values{}
12 12
 	if force {
... ...
@@ -9,7 +9,7 @@ import (
9 9
 	"golang.org/x/net/context"
10 10
 )
11 11
 
12
-// SwarmUpdate updates the Swarm.
12
+// SwarmUpdate updates the swarm.
13 13
 func (cli *Client) SwarmUpdate(ctx context.Context, version swarm.Version, swarm swarm.Spec, flags swarm.UpdateFlags) error {
14 14
 	query := url.Values{}
15 15
 	query.Set("version", strconv.FormatUint(version.Index, 10))
... ...
@@ -16,7 +16,7 @@ func (tf transportFunc) RoundTrip(req *http.Request) (*http.Response, error) {
16 16
 	return tf(req)
17 17
 }
18 18
 
19
-// resolveTLSConfig attempts to resolve the tls configuration from the
19
+// resolveTLSConfig attempts to resolve the TLS configuration from the
20 20
 // RoundTripper.
21 21
 func resolveTLSConfig(transport http.RoundTripper) *tls.Config {
22 22
 	switch tr := transport.(type) {
... ...
@@ -27,7 +27,7 @@ Options:
27 27
   -q, --quiet          Only display IDs
28 28
 ```
29 29
 
30
-Run this command on a manager node to list the secrets in the Swarm.
30
+Run this command on a manager node to list the secrets in the swarm.
31 31
 
32 32
 ## Examples
33 33
 
... ...
@@ -37,7 +37,7 @@ func ValidateHost(val string) (string, error) {
37 37
 		}
38 38
 	}
39 39
 	// Note: unlike most flag validators, we don't return the mutated value here
40
-	//       we need to know what the user entered later (using ParseHost) to adjust for tls
40
+	//       we need to know what the user entered later (using ParseHost) to adjust for TLS
41 41
 	return val, nil
42 42
 }
43 43