Skip to content

Commit

Permalink
Fix code style (no yoda conditions)
Browse files Browse the repository at this point in the history
  • Loading branch information
eirslett committed Feb 12, 2021
1 parent b7c85ee commit 1467baf
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ssl.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func ssl(o values) (func(net.Conn) (net.Conn, error), error) {
// the correct permissions.
func sslClientCertificates(tlsConf *tls.Config, o values) error {
sslinline := o["sslinline"]
if "true" == sslinline {
if sslinline == "true" {
cert, err := tls.X509KeyPair([]byte(o["sslcert"]), []byte(o["sslkey"]))
// Clear out these params, in case they were to be sent to the PostgreSQL server by mistake
o["sslcert"] = ""
Expand Down Expand Up @@ -156,7 +156,7 @@ func sslCertificateAuthority(tlsConf *tls.Config, o values) error {
sslinline := o["sslinline"]

var cert []byte
if "true" == sslinline {
if sslinline == "true" {
// // Clear out this param, in case it were to be sent to the PostgreSQL server by mistake
o["sslrootcert"] = ""
cert = []byte(sslrootcert)
Expand Down

0 comments on commit 1467baf

Please sign in to comment.