diff --git a/pgconn/config.go b/pgconn/config.go index f12dfc1e..57243e82 100644 --- a/pgconn/config.go +++ b/pgconn/config.go @@ -51,7 +51,7 @@ type Config struct { KerberosSpn string Fallbacks []*FallbackConfig - SSLnegotiation string // sslnegotiation=postgres or sslnegotiation=direct + SSLNegotiation string // sslnegotiation=postgres or sslnegotiation=direct // ValidateConnect is called during a connection attempt after a successful authentication with the PostgreSQL server. // It can be used to validate that the server is acceptable. If this returns an error the connection is closed and the next @@ -389,7 +389,7 @@ func ParseConfigWithOptions(connString string, options ParseConfigOptions) (*Con config.Port = fallbacks[0].Port config.TLSConfig = fallbacks[0].TLSConfig config.Fallbacks = fallbacks[1:] - config.SSLnegotiation = settings["sslnegotiation"] + config.SSLNegotiation = settings["sslnegotiation"] passfile, err := pgpassfile.ReadPassfile(settings["passfile"]) if err == nil { diff --git a/pgconn/pgconn.go b/pgconn/pgconn.go index 26a590ca..bf3eaec6 100644 --- a/pgconn/pgconn.go +++ b/pgconn/pgconn.go @@ -329,7 +329,7 @@ func connectOne(ctx context.Context, config *Config, connectConfig *connectOneCo tlsConn net.Conn err error ) - if config.SSLnegotiation == "direct" { + if config.SSLNegotiation == "direct" { tlsConn = tls.Client(pgConn.conn, connectConfig.tlsConfig) } else { tlsConn, err = startTLS(pgConn.conn, connectConfig.tlsConfig)