Skip to content

Commit

Permalink
Go 1.19 go fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
jackc committed Aug 6, 2022
1 parent 7ad36f3 commit f3e04b2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
14 changes: 7 additions & 7 deletions conn.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,14 +116,14 @@ func ConnectConfig(ctx context.Context, connConfig *ConnConfig) (*Conn, error) {
// ParseConfig creates a ConnConfig from a connection string. ParseConfig handles all options that pgconn.ParseConfig
// does. In addition, it accepts the following options:
//
// statement_cache_capacity
// The maximum size of the automatic statement cache. Set to 0 to disable automatic statement caching. Default: 512.
// statement_cache_capacity
// The maximum size of the automatic statement cache. Set to 0 to disable automatic statement caching. Default: 512.
//
// statement_cache_mode
// Possible values: "prepare" and "describe". "prepare" will create prepared statements on the PostgreSQL server.
// "describe" will use the anonymous prepared statement to describe a statement without creating a statement on the
// server. "describe" is primarily useful when the environment does not allow prepared statements such as when
// running a connection pooler like PgBouncer. Default: "prepare"
// statement_cache_mode
// Possible values: "prepare" and "describe". "prepare" will create prepared statements on the PostgreSQL server.
// "describe" will use the anonymous prepared statement to describe a statement without creating a statement on the
// server. "describe" is primarily useful when the environment does not allow prepared statements such as when
// running a connection pooler like PgBouncer. Default: "prepare"
//
// prefer_simple_protocol
// Possible values: "true" and "false". Use the simple protocol instead of extended protocol. Default: false
Expand Down
8 changes: 4 additions & 4 deletions large_objects.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ func (o *LargeObjects) Unlink(ctx context.Context, oid uint32) error {
// A LargeObject is a large object stored on the server. It is only valid within the transaction that it was initialized
// in. It uses the context it was initialized with for all operations. It implements these interfaces:
//
// io.Writer
// io.Reader
// io.Seeker
// io.Closer
// io.Writer
// io.Reader
// io.Seeker
// io.Closer
type LargeObject struct {
ctx context.Context
tx Tx
Expand Down
1 change: 1 addition & 0 deletions logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ func (f LoggerFunc) Log(ctx context.Context, level LogLevel, msg string, data ma
// LogLevelFromString converts log level string to constant
//
// Valid levels:
//
// trace
// debug
// info
Expand Down
9 changes: 5 additions & 4 deletions pgxpool/pool.go
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,7 @@ func ConnectConfig(ctx context.Context, config *Config) (*Pool, error) {
// cancellation
// see https://github.com/jackc/pgx/issues/1259
ctx = detachedCtx{ctx}

connConfig := p.config.ConnConfig

if p.beforeConnect != nil {
Expand Down Expand Up @@ -290,11 +291,11 @@ func ConnectConfig(ctx context.Context, config *Config) (*Pool, error) {
//
// See Config for definitions of these arguments.
//
// # Example DSN
// user=jack password=secret host=pg.example.com port=5432 dbname=mydb sslmode=verify-ca pool_max_conns=10
// # Example DSN
// user=jack password=secret host=pg.example.com port=5432 dbname=mydb sslmode=verify-ca pool_max_conns=10
//
// # Example URL
// postgres://jack:secret@pg.example.com:5432/mydb?sslmode=verify-ca&pool_max_conns=10
// # Example URL
// postgres://jack:secret@pg.example.com:5432/mydb?sslmode=verify-ca&pool_max_conns=10
func ParseConfig(connString string) (*Config, error) {
connConfig, err := pgx.ParseConfig(connString)
if err != nil {
Expand Down

0 comments on commit f3e04b2

Please sign in to comment.