Skip to content

Commit

Permalink
Publicly expose the driver so it can be wrapped (#166)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luna Duclos authored and hfwang committed Nov 9, 2018
1 parent 1214300 commit e570627
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions proxy/dialers/postgres/hook.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ import (
)

func init() {
sql.Register("cloudsqlpostgres", &drv{})
sql.Register("cloudsqlpostgres", &Driver{})
}

type drv struct{}
type Driver struct{}

type dialer struct{}

Expand All @@ -56,6 +56,6 @@ func (d dialer) DialTimeout(ntw, addr string, timeout time.Duration) (net.Conn,
return nil, fmt.Errorf("timeout is not currently supported for cloudsqlpostgres dialer")
}

func (d *drv) Open(name string) (driver.Conn, error) {
func (d *Driver) Open(name string) (driver.Conn, error) {
return pq.DialOpen(dialer{}, name)
}

0 comments on commit e570627

Please sign in to comment.