Skip to content

Commit

Permalink
Fix typos in comments
Browse files Browse the repository at this point in the history
  • Loading branch information
horgh authored and jackc committed Feb 19, 2022
1 parent 34bf0a5 commit ccb96b8
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pgconn.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ type PgConn struct {
}

// Connect establishes a connection to a PostgreSQL server using the environment and connString (in URL or DSN format)
// to provide configuration. See documention for ParseConfig for details. ctx can be used to cancel a connect attempt.
// to provide configuration. See documentation for ParseConfig for details. ctx can be used to cancel a connect attempt.
func Connect(ctx context.Context, connString string) (*PgConn, error) {
config, err := ParseConfig(connString)
if err != nil {
Expand Down Expand Up @@ -154,7 +154,7 @@ func ConnectConfig(ctx context.Context, config *Config) (pgConn *PgConn, err err
break
} else if pgerr, ok := err.(*PgError); ok {
err = &connectError{config: config, msg: "server error", err: pgerr}
ERRCODE_INVALID_PASSWORD := "28P01" // worng password
ERRCODE_INVALID_PASSWORD := "28P01" // wrong password
ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION := "28000" // db does not exist
if pgerr.Code == ERRCODE_INVALID_PASSWORD || pgerr.Code == ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION {
break
Expand Down

0 comments on commit ccb96b8

Please sign in to comment.