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

Method Copy

conn.go:55–60  ·  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

53// The only exception is the tls.Config:
54// according to the tls.Config docs it must not be modified after creation.
55func (cc *ConnConfig) Copy() *ConnConfig {
56 newConfig := new(ConnConfig)
57 *newConfig = *cc
58 newConfig.Config = *newConfig.Config.Copy()
59 return newConfig
60}
61
62// ConnString returns the connection string as parsed by pgx.ParseConfig into pgx.ConnConfig.
63func (cc *ConnConfig) ConnString() string { return cc.connString }

Callers 4

ConnectConfigFunction · 0.45
ConfigMethod · 0.45

Calls

no outgoing calls

Tested by 2