Example #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)
	}
}
Example #2
0
func connect(instance string) (net.Conn, error) {
	return cloudsql.Dial(instance)
}
Example #3
0
func init() {
	SetDialer(func(proto, laddr, raddr, user, dbname string, timeout time.Duration) (net.Conn, error) {
		return cloudsql.Dial(raddr)
	})
}