@@ -76,19 +76,19 @@ func (d driver) Open(dsn string) (sqldriver.Conn, error) {
76
76
tlsConfigName , tls := params ["ssl" ]
77
77
if tls {
78
78
switch tlsConfigName {
79
- case "true" :
80
- // This actually does insecureSkipVerify
81
- // But not even sure if it makes sense to handle false? According to
82
- // client_test.go it doesn't - it'd result in an error
83
- c , err = client .Connect (addr , user , password , db , func (c * client.Conn ) { c .UseSSL (true ) })
84
- case "custom" :
85
- // I was too concerned about mimicking what go-sql-driver/mysql does which will
86
- // allow any name for a custom tls profile and maps the query parameter value to
87
- // that TLSConfig variable... there is no need to be that clever. We can just
88
- // insist `"custom"` (string) == `custom` (TLSConfig)
89
- c , err = client .Connect (addr , user , password , db , func (c * client.Conn ) {c .SetTLSConfig (customTLSConfig )})
90
- default :
91
- return nil , errors .Errorf ("Supported options are ssl=true or ssl=custom" )
79
+ case "true" :
80
+ // This actually does insecureSkipVerify
81
+ // But not even sure if it makes sense to handle false? According to
82
+ // client_test.go it doesn't - it'd result in an error
83
+ c , err = client .Connect (addr , user , password , db , func (c * client.Conn ) { c .UseSSL (true ) })
84
+ case "custom" :
85
+ // I was too concerned about mimicking what go-sql-driver/mysql does which will
86
+ // allow any name for a custom tls profile and maps the query parameter value to
87
+ // that TLSConfig variable... there is no need to be that clever. We can just
88
+ // insist `"custom"` (string) == `custom` (TLSConfig)
89
+ c , err = client .Connect (addr , user , password , db , func (c * client.Conn ) { c .SetTLSConfig (customTLSConfig ) })
90
+ default :
91
+ return nil , errors .Errorf ("Supported options are ssl=true or ssl=custom" )
92
92
}
93
93
} else {
94
94
c , err = client .Connect (addr , user , password , db )
0 commit comments