MCPcopy
hub / github.com/jackc/pgx / Copy

Method Copy

pgxpool/pool.go:199–204  ·  view source on GitHub ↗

Copy returns a deep copy of the config that is safe to use and modify. The only exception is the tls.Config: according to the tls.Config docs it must not be modified after creation.

()

Source from the content-addressed store, hash-verified

197// The only exception is the tls.Config:
198// according to the tls.Config docs it must not be modified after creation.
199func (c *Config) Copy() *Config {
200 newConfig := new(Config)
201 *newConfig = *c
202 newConfig.ConnConfig = c.ConnConfig.Copy()
203 return newConfig
204}
205
206// ConnString returns the connection string as parsed by pgxpool.ParseConfig into pgxpool.Config.
207func (c *Config) ConnString() string { return c.ConnConfig.ConnString() }

Callers 4

NewWithConfigFunction · 0.45
ConfigMethod · 0.45

Calls

no outgoing calls

Tested by 2