NewConfig creates a new config with default value.
()
| 52 | |
| 53 | // NewConfig creates a new config with default value. |
| 54 | func NewConfig() *Config { |
| 55 | return &Config{UseLeader: true} |
| 56 | } |
| 57 | |
| 58 | // FormatDSN formats the given Config into a DSN string which can be passed to the driver. |
| 59 | func (cfg *Config) FormatDSN() string { |