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.
()
| 53 | // The only exception is the tls.Config: |
| 54 | // according to the tls.Config docs it must not be modified after creation. |
| 55 | func (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. |
| 63 | func (cc *ConnConfig) ConnString() string { return cc.connString } |
no outgoing calls