mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
golint fix TLs->TLS in docker/
Signed-off-by: Sevki Hasirci <s@sevki.org>
This commit is contained in:
parent
77bbee3d00
commit
16ea3cf3a3
3 changed files with 9 additions and 9 deletions
|
@ -123,8 +123,8 @@ func mainDaemon() {
|
|||
}
|
||||
serverConfig = setPlatformServerConfig(serverConfig, daemonCfg)
|
||||
|
||||
if *flTls {
|
||||
if *flTlsVerify {
|
||||
if *flTlS {
|
||||
if *flTlSVerify {
|
||||
tlsOptions.ClientAuth = tls.RequireAndVerifyClientCert
|
||||
}
|
||||
tlsConfig, err := tlsconfig.Server(tlsOptions)
|
||||
|
|
|
@ -92,8 +92,8 @@ func main() {
|
|||
// Regardless of whether the user sets it to true or false, if they
|
||||
// specify --tlsverify at all then we need to turn on tls
|
||||
// *flTlsVerify can be true even if not set due to DOCKER_TLS_VERIFY env var, so we need to check that here as well
|
||||
if flag.IsSet("-tlsverify") || *flTlsVerify {
|
||||
*flTls = true
|
||||
if flag.IsSet("-tlsverify") || *flTlSVerify {
|
||||
*flTlS = true
|
||||
}
|
||||
|
||||
if *flDaemon {
|
||||
|
@ -114,8 +114,8 @@ func main() {
|
|||
protoAddrParts := strings.SplitN(flHosts[0], "://", 2)
|
||||
|
||||
var tlsConfig *tls.Config
|
||||
if *flTls {
|
||||
tlsOptions.InsecureSkipVerify = !*flTlsVerify
|
||||
if *flTlS {
|
||||
tlsOptions.InsecureSkipVerify = !*flTlSVerify
|
||||
if !flag.IsSet("-tlscert") {
|
||||
if _, err := os.Stat(tlsOptions.CertFile); os.IsNotExist(err) {
|
||||
tlsOptions.CertFile = ""
|
||||
|
|
|
@ -26,7 +26,7 @@ func (a byName) Less(i, j int) bool { return a[i].name < a[j].name }
|
|||
|
||||
var (
|
||||
dockerCertPath = os.Getenv("DOCKER_CERT_PATH")
|
||||
dockerTlsVerify = os.Getenv("DOCKER_TLS_VERIFY") != ""
|
||||
dockerTlSVerify = os.Getenv("DOCKER_TLS_VERIFY") != ""
|
||||
|
||||
dockerCommands = []command{
|
||||
{"attach", "Attach to a running container"},
|
||||
|
@ -91,9 +91,9 @@ var (
|
|||
flDaemon = flag.Bool([]string{"d", "-daemon"}, false, "Enable daemon mode")
|
||||
flDebug = flag.Bool([]string{"D", "-debug"}, false, "Enable debug mode")
|
||||
flLogLevel = flag.String([]string{"l", "-log-level"}, "info", "Set the logging level")
|
||||
flTls = flag.Bool([]string{"-tls"}, false, "Use TLS; implied by --tlsverify")
|
||||
flTlS = flag.Bool([]string{"-tls"}, false, "Use TLS; implied by --tlsverify")
|
||||
flHelp = flag.Bool([]string{"h", "-help"}, false, "Print usage")
|
||||
flTlsVerify = flag.Bool([]string{"-tlsverify"}, dockerTlsVerify, "Use TLS and verify the remote")
|
||||
flTlSVerify = flag.Bool([]string{"-tlsverify"}, dockerTlSVerify, "Use TLS and verify the remote")
|
||||
|
||||
// these are initialized in init() below since their default values depend on dockerCertPath which isn't fully initialized until init() runs
|
||||
tlsOptions tlsconfig.Options
|
||||
|
|
Loading…
Add table
Reference in a new issue