go-zero: How to set timeout params in sqlx.NewMysql
Hi,
I want to set some mysql params (e.g. timeout), but I found the SqlOption is private var.
func NewMysql(datasource string, opts ...SqlOption) SqlConn {
opts = append(opts, withMysqlAcceptable())
return NewSqlConn(mysqlDriverName, datasource, opts...)
}
SqlOption func(*commonSqlConn)
So how to fix or workaround?
About this issue
- Original URL
- State: open
- Created 2 years ago
- Comments: 16 (5 by maintainers)
Open 25 days ago, no substantial progress, and I think there has a inactive community
Has left six days, but there is no progress … 💔