Skip to content

Commit b52c4c5

Browse files
authored
reformat dsn.go
1 parent 63f0c4b commit b52c4c5

File tree

1 file changed

+20
-19
lines changed

1 file changed

+20
-19
lines changed

dsn.go

+20-19
Original file line numberDiff line numberDiff line change
@@ -37,25 +37,26 @@ var (
3737
type Config struct {
3838
// non boolean fields
3939

40-
User string // Username
41-
Passwd string // Password (requires User)
42-
Net string // Network (e.g. "tcp", "tcp6", "unix". default: "tcp")
43-
Addr string // Address (default: "127.0.0.1:3306" for "tcp" and "/tmp/mysql.sock" for "unix")
44-
DBName string // Database name
45-
Params map[string]string // Connection parameters
46-
ConnectionAttributes string // Connection Attributes, comma-delimited string of user-defined "key:value" pairs
47-
charsets []string // Connection charset. When set, this will be set in SET NAMES <charset> query
48-
Collation string // Connection collation. When set, this will be set in SET NAMES <charset> COLLATE <collation> query
49-
Loc *time.Location // Location for time.Time values
50-
MaxAllowedPacket int // Max packet size allowed
51-
ServerPubKey string // Server public key name
52-
TLSConfig string // TLS configuration name
53-
TLS *tls.Config // TLS configuration, its priority is higher than TLSConfig
54-
Timeout time.Duration // Dial timeout
55-
ReadTimeout time.Duration // I/O read timeout
56-
WriteTimeout time.Duration // I/O write timeout
57-
Logger Logger // Logger
58-
DialFunc func(ctx context.Context, network, addr string) (net.Conn, error) // Specifies the dial function for creating connections
40+
User string // Username
41+
Passwd string // Password (requires User)
42+
Net string // Network (e.g. "tcp", "tcp6", "unix". default: "tcp")
43+
Addr string // Address (default: "127.0.0.1:3306" for "tcp" and "/tmp/mysql.sock" for "unix")
44+
DBName string // Database name
45+
Params map[string]string // Connection parameters
46+
ConnectionAttributes string // Connection Attributes, comma-delimited string of user-defined "key:value" pairs
47+
charsets []string // Connection charset. When set, this will be set in SET NAMES <charset> query
48+
Collation string // Connection collation. When set, this will be set in SET NAMES <charset> COLLATE <collation> query
49+
Loc *time.Location // Location for time.Time values
50+
MaxAllowedPacket int // Max packet size allowed
51+
ServerPubKey string // Server public key name
52+
TLSConfig string // TLS configuration name
53+
TLS *tls.Config // TLS configuration, its priority is higher than TLSConfig
54+
Timeout time.Duration // Dial timeout
55+
ReadTimeout time.Duration // I/O read timeout
56+
WriteTimeout time.Duration // I/O write timeout
57+
Logger Logger // Logger
58+
// DialFunc specifies the dial function for creating connections
59+
DialFunc func(ctx context.Context, network, addr string) (net.Conn, error)
5960

6061
// boolean fields
6162

0 commit comments

Comments
 (0)