From ddd966f09fb493ee3becdbca6001b6293ca7a975 Mon Sep 17 00:00:00 2001 From: divyam234 <47589864+divyam234@users.noreply.github.com> Date: Mon, 31 Mar 2025 15:06:55 +0200 Subject: [PATCH] update --- pgconn/config.go | 4 ++-- pgconn/pgconn.go | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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)