Merge pull request #29565 from yuexiao-wang/fix-typo-tls

Change tls to TLS
This commit is contained in:
Vincent Demeester 2016-12-22 12:10:09 +01:00 committed by GitHub
commit 8f9a48ab5a
11 changed files with 13 additions and 13 deletions

View File

@ -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 {

View File

@ -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

View File

@ -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")
}
}

View File

@ -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 {

View File

@ -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 {

View File

@ -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)

View File

@ -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 {

View File

@ -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))

View File

@ -13,7 +13,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) {

View File

@ -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

View File

@ -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
}