Run go fmt

pull/1281/head
Jack Christensen 2022-07-20 06:06:54 -05:00
parent cdd2cc4124
commit 69b99209fb
4 changed files with 20 additions and 19 deletions

View File

@ -715,16 +715,16 @@ func configTLS(settings map[string]string, thisHost string, parseConfigOptions P
if x509.IsEncryptedPEMBlock(block) { if x509.IsEncryptedPEMBlock(block) {
// Attempt decryption with pass phrase // Attempt decryption with pass phrase
// NOTE: only supports RSA (PKCS#1) // NOTE: only supports RSA (PKCS#1)
if(sslpassword != ""){ if sslpassword != "" {
decryptedKey, decryptedError = x509.DecryptPEMBlock(block, []byte(sslpassword)) decryptedKey, decryptedError = x509.DecryptPEMBlock(block, []byte(sslpassword))
} }
//if sslpassword not provided or has decryption error when use it //if sslpassword not provided or has decryption error when use it
//try to find sslpassword with callback function //try to find sslpassword with callback function
if (sslpassword == "" || decryptedError!= nil) { if sslpassword == "" || decryptedError != nil {
if(parseConfigOptions.GetSSLPassword != nil){ if parseConfigOptions.GetSSLPassword != nil {
sslpassword = parseConfigOptions.GetSSLPassword(context.Background()) sslpassword = parseConfigOptions.GetSSLPassword(context.Background())
} }
if(sslpassword == ""){ if sslpassword == "" {
return nil, fmt.Errorf("unable to find sslpassword") return nil, fmt.Errorf("unable to find sslpassword")
} }
} }

View File

@ -1,3 +1,4 @@
//go:build !windows
// +build !windows // +build !windows
package pgconn package pgconn