Пример #1
0
func init() {
	if dials == nil {
		dials = make(map[string]dialFunc)
	}
	dials["cloudsql"] = func(cfg *config) (net.Conn, error) {
		return cloudsql.Dial(cfg.addr)
	}
}
Пример #2
0
func connect(instance string) (net.Conn, error) {
	return cloudsql.Dial(instance)
}
Пример #3
0
func init() {
	SetDialer(func(proto, laddr, raddr, user, dbname string, timeout time.Duration) (net.Conn, error) {
		return cloudsql.Dial(raddr)
	})
}