Commit 3f9f0679 by Daniel Low

gofmt

parent ea566fff
...@@ -14,11 +14,11 @@ import ( ...@@ -14,11 +14,11 @@ import (
"github.com/grafana/grafana/pkg/services/sqlstore/migrator" "github.com/grafana/grafana/pkg/services/sqlstore/migrator"
"github.com/grafana/grafana/pkg/setting" "github.com/grafana/grafana/pkg/setting"
"github.com/go-sql-driver/mysql"
_ "github.com/go-sql-driver/mysql" _ "github.com/go-sql-driver/mysql"
"github.com/go-xorm/xorm" "github.com/go-xorm/xorm"
_ "github.com/lib/pq" _ "github.com/lib/pq"
_ "github.com/mattn/go-sqlite3" _ "github.com/mattn/go-sqlite3"
"github.com/go-sql-driver/mysql"
) )
type MySQLConfig struct { type MySQLConfig struct {
......
...@@ -17,7 +17,7 @@ func makeCert(tlsPoolName string, config MySQLConfig) (*tls.Config, error) { ...@@ -17,7 +17,7 @@ func makeCert(tlsPoolName string, config MySQLConfig) (*tls.Config, error) {
return nil, err return nil, err
} }
clientCert := make([]tls.Certificate, 0, 1) clientCert := make([]tls.Certificate, 0, 1)
if (config.ClientCertPath != "" && config.ClientKeyPath != "") { if config.ClientCertPath != "" && config.ClientKeyPath != "" {
certs, err := tls.LoadX509KeyPair(config.ClientCertPath, config.ClientKeyPath) certs, err := tls.LoadX509KeyPair(config.ClientCertPath, config.ClientKeyPath)
if err != nil { if err != nil {
...@@ -34,7 +34,7 @@ func makeCert(tlsPoolName string, config MySQLConfig) (*tls.Config, error) { ...@@ -34,7 +34,7 @@ func makeCert(tlsPoolName string, config MySQLConfig) (*tls.Config, error) {
tlsConfig.InsecureSkipVerify = true tlsConfig.InsecureSkipVerify = true
} }
// Return more meaningful error before it is too late // Return more meaningful error before it is too late
if config.ServerCertName == "" && !tlsConfig.InsecureSkipVerify{ if config.ServerCertName == "" && !tlsConfig.InsecureSkipVerify {
return nil, fmt.Errorf("server_cert_name is missing. Consider using ssl_mode = skip-verify.") return nil, fmt.Errorf("server_cert_name is missing. Consider using ssl_mode = skip-verify.")
} }
return tlsConfig, nil return tlsConfig, nil
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment