2
0

Rename pgxpool.NewConfig to NewWithConfig

https://github.com/jackc/pgx/issues/1264
This commit is contained in:
Jack Christensen
2022-07-30 09:16:42 -05:00
parent c3258b7f52
commit 033fc6f62a
4 changed files with 18 additions and 18 deletions
+3 -3
View File
@@ -160,11 +160,11 @@ func New(ctx context.Context, connString string) (*Pool, error) {
return nil, err
}
return NewConfig(ctx, config)
return NewWithConfig(ctx, config)
}
// NewConfig creates a new Pool. config must have been created by ParseConfig.
func NewConfig(ctx context.Context, config *Config) (*Pool, error) {
// NewWithConfig creates a new Pool. config must have been created by ParseConfig.
func NewWithConfig(ctx context.Context, config *Config) (*Pool, error) {
// Default values are set in ParseConfig. Enforce initial creation by ParseConfig rather than setting defaults from
// zero values.
if !config.createdByParseConfig {