Browse code

golint fix TLs->TLS in docker/

Signed-off-by: Sevki Hasirci <s@sevki.org>

Sevki Hasirci authored on 2015/07/21 02:48:00
Showing 3 changed files
... ...
@@ -123,8 +123,8 @@ func mainDaemon() {
123 123
 	}
124 124
 	serverConfig = setPlatformServerConfig(serverConfig, daemonCfg)
125 125
 
126
-	if *flTls {
127
-		if *flTlsVerify {
126
+	if *flTlS {
127
+		if *flTlSVerify {
128 128
 			tlsOptions.ClientAuth = tls.RequireAndVerifyClientCert
129 129
 		}
130 130
 		tlsConfig, err := tlsconfig.Server(tlsOptions)
... ...
@@ -92,8 +92,8 @@ func main() {
92 92
 	// Regardless of whether the user sets it to true or false, if they
93 93
 	// specify --tlsverify at all then we need to turn on tls
94 94
 	// *flTlsVerify can be true even if not set due to DOCKER_TLS_VERIFY env var, so we need to check that here as well
95
-	if flag.IsSet("-tlsverify") || *flTlsVerify {
96
-		*flTls = true
95
+	if flag.IsSet("-tlsverify") || *flTlSVerify {
96
+		*flTlS = true
97 97
 	}
98 98
 
99 99
 	if *flDaemon {
... ...
@@ -114,8 +114,8 @@ func main() {
114 114
 	protoAddrParts := strings.SplitN(flHosts[0], "://", 2)
115 115
 
116 116
 	var tlsConfig *tls.Config
117
-	if *flTls {
118
-		tlsOptions.InsecureSkipVerify = !*flTlsVerify
117
+	if *flTlS {
118
+		tlsOptions.InsecureSkipVerify = !*flTlSVerify
119 119
 		if !flag.IsSet("-tlscert") {
120 120
 			if _, err := os.Stat(tlsOptions.CertFile); os.IsNotExist(err) {
121 121
 				tlsOptions.CertFile = ""
... ...
@@ -26,7 +26,7 @@ func (a byName) Less(i, j int) bool { return a[i].name < a[j].name }
26 26
 
27 27
 var (
28 28
 	dockerCertPath  = os.Getenv("DOCKER_CERT_PATH")
29
-	dockerTlsVerify = os.Getenv("DOCKER_TLS_VERIFY") != ""
29
+	dockerTlSVerify = os.Getenv("DOCKER_TLS_VERIFY") != ""
30 30
 
31 31
 	dockerCommands = []command{
32 32
 		{"attach", "Attach to a running container"},
... ...
@@ -91,9 +91,9 @@ var (
91 91
 	flDaemon    = flag.Bool([]string{"d", "-daemon"}, false, "Enable daemon mode")
92 92
 	flDebug     = flag.Bool([]string{"D", "-debug"}, false, "Enable debug mode")
93 93
 	flLogLevel  = flag.String([]string{"l", "-log-level"}, "info", "Set the logging level")
94
-	flTls       = flag.Bool([]string{"-tls"}, false, "Use TLS; implied by --tlsverify")
94
+	flTlS       = flag.Bool([]string{"-tls"}, false, "Use TLS; implied by --tlsverify")
95 95
 	flHelp      = flag.Bool([]string{"h", "-help"}, false, "Print usage")
96
-	flTlsVerify = flag.Bool([]string{"-tlsverify"}, dockerTlsVerify, "Use TLS and verify the remote")
96
+	flTlSVerify = flag.Bool([]string{"-tlsverify"}, dockerTlSVerify, "Use TLS and verify the remote")
97 97
 
98 98
 	// these are initialized in init() below since their default values depend on dockerCertPath which isn't fully initialized until init() runs
99 99
 	tlsOptions tlsconfig.Options