Example #1
0
func init() {
	mysql.RegisterDial("tcp", func(addr string) (net.Conn, error) {
		return (&net.Dialer{Timeout: DialTimeout}).Dial("tcp", addr)
	})
	mysql.RegisterDial("unix", func(addr string) (net.Conn, error) {
		return (&net.Dialer{Timeout: DialTimeout}).Dial("unix", addr)
	})
	logger := log.Log.Tag("mysql").DebugLevel()
	mysql.SetLogger(logger)
}
func init() {
	mysql.RegisterDial("cloudsql", proxy.Dial)
}