From f581584148c5e51c1d05b1418e9ad24d96512220 Mon Sep 17 00:00:00 2001 From: Alexey Palazhchenko Date: Mon, 23 Jan 2023 07:22:36 +0400 Subject: [PATCH] Use Go 1.19's lists for proper formatting --- conn.go | 18 +++++++++--------- pgconn/config.go | 6 +++--- pgxpool/pool.go | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/conn.go b/conn.go index b4bbdb5b..eefe6403 100644 --- a/conn.go +++ b/conn.go @@ -197,17 +197,17 @@ func ParseConfigWithOptions(connString string, options ParseConfigOptions) (*Con // ParseConfig creates a ConnConfig from a connection string. ParseConfig handles all options that pgconn.ParseConfig // does. In addition, it accepts the following options: // -// default_query_exec_mode -// Possible values: "cache_statement", "cache_describe", "describe_exec", "exec", and "simple_protocol". See -// QueryExecMode constant documentation for the meaning of these values. Default: "cache_statement". +// - default_query_exec_mode. +// Possible values: "cache_statement", "cache_describe", "describe_exec", "exec", and "simple_protocol". See +// QueryExecMode constant documentation for the meaning of these values. Default: "cache_statement". // -// statement_cache_capacity -// The maximum size of the statement cache used when executing a query with "cache_statement" query exec mode. -// Default: 512. +// - statement_cache_capacity. +// The maximum size of the statement cache used when executing a query with "cache_statement" query exec mode. +// Default: 512. // -// description_cache_capacity -// The maximum size of the description cache used when executing a query with "cache_describe" query exec mode. -// Default: 512. +// - description_cache_capacity. +// The maximum size of the description cache used when executing a query with "cache_describe" query exec mode. +// Default: 512. func ParseConfig(connString string) (*ConnConfig, error) { return ParseConfigWithOptions(connString, ParseConfigOptions{}) } diff --git a/pgconn/config.go b/pgconn/config.go index 005d3fe2..24bf837c 100644 --- a/pgconn/config.go +++ b/pgconn/config.go @@ -210,9 +210,9 @@ func NetworkAddress(host string, port uint16) (network, address string) { // // In addition, ParseConfig accepts the following options: // -// servicefile -// libpq only reads servicefile from the PGSERVICEFILE environment variable. ParseConfig accepts servicefile as a -// part of the connection string. +// - servicefile. +// libpq only reads servicefile from the PGSERVICEFILE environment variable. ParseConfig accepts servicefile as a +// part of the connection string. func ParseConfig(connString string) (*Config, error) { var parseConfigOptions ParseConfigOptions return ParseConfigWithOptions(connString, parseConfigOptions) diff --git a/pgxpool/pool.go b/pgxpool/pool.go index 51f8afcc..7649488e 100644 --- a/pgxpool/pool.go +++ b/pgxpool/pool.go @@ -261,12 +261,12 @@ func NewWithConfig(ctx context.Context, config *Config) (*Pool, error) { // ParseConfig builds a Config from connString. It parses connString with the same behavior as pgx.ParseConfig with the // addition of the following variables: // -// pool_max_conns: integer greater than 0 -// pool_min_conns: integer 0 or greater -// pool_max_conn_lifetime: duration string -// pool_max_conn_idle_time: duration string -// pool_health_check_period: duration string -// pool_max_conn_lifetime_jitter: duration string +// - pool_max_conns: integer greater than 0 +// - pool_min_conns: integer 0 or greater +// - pool_max_conn_lifetime: duration string +// - pool_max_conn_idle_time: duration string +// - pool_health_check_period: duration string +// - pool_max_conn_lifetime_jitter: duration string // // See Config for definitions of these arguments. //