Use Go 1.19's lists for proper formatting

pull/1478/head
Alexey Palazhchenko 2023-01-23 07:22:36 +04:00 committed by Jack Christensen
parent e48e7a7189
commit f581584148
3 changed files with 18 additions and 18 deletions

18
conn.go
View File

@ -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 // ParseConfig creates a ConnConfig from a connection string. ParseConfig handles all options that pgconn.ParseConfig
// does. In addition, it accepts the following options: // does. In addition, it accepts the following options:
// //
// default_query_exec_mode // - default_query_exec_mode.
// Possible values: "cache_statement", "cache_describe", "describe_exec", "exec", and "simple_protocol". See // 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". // QueryExecMode constant documentation for the meaning of these values. Default: "cache_statement".
// //
// statement_cache_capacity // - statement_cache_capacity.
// The maximum size of the statement cache used when executing a query with "cache_statement" query exec mode. // The maximum size of the statement cache used when executing a query with "cache_statement" query exec mode.
// Default: 512. // Default: 512.
// //
// description_cache_capacity // - description_cache_capacity.
// The maximum size of the description cache used when executing a query with "cache_describe" query exec mode. // The maximum size of the description cache used when executing a query with "cache_describe" query exec mode.
// Default: 512. // Default: 512.
func ParseConfig(connString string) (*ConnConfig, error) { func ParseConfig(connString string) (*ConnConfig, error) {
return ParseConfigWithOptions(connString, ParseConfigOptions{}) return ParseConfigWithOptions(connString, ParseConfigOptions{})
} }

View File

@ -210,9 +210,9 @@ func NetworkAddress(host string, port uint16) (network, address string) {
// //
// In addition, ParseConfig accepts the following options: // In addition, ParseConfig accepts the following options:
// //
// servicefile // - servicefile.
// libpq only reads servicefile from the PGSERVICEFILE environment variable. ParseConfig accepts servicefile as a // libpq only reads servicefile from the PGSERVICEFILE environment variable. ParseConfig accepts servicefile as a
// part of the connection string. // part of the connection string.
func ParseConfig(connString string) (*Config, error) { func ParseConfig(connString string) (*Config, error) {
var parseConfigOptions ParseConfigOptions var parseConfigOptions ParseConfigOptions
return ParseConfigWithOptions(connString, parseConfigOptions) return ParseConfigWithOptions(connString, parseConfigOptions)

View File

@ -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 // ParseConfig builds a Config from connString. It parses connString with the same behavior as pgx.ParseConfig with the
// addition of the following variables: // addition of the following variables:
// //
// pool_max_conns: integer greater than 0 // - pool_max_conns: integer greater than 0
// pool_min_conns: integer 0 or greater // - pool_min_conns: integer 0 or greater
// pool_max_conn_lifetime: duration string // - pool_max_conn_lifetime: duration string
// pool_max_conn_idle_time: duration string // - pool_max_conn_idle_time: duration string
// pool_health_check_period: duration string // - pool_health_check_period: duration string
// pool_max_conn_lifetime_jitter: duration string // - pool_max_conn_lifetime_jitter: duration string
// //
// See Config for definitions of these arguments. // See Config for definitions of these arguments.
// //