@@ -236,7 +236,7 @@ type connector struct {
236236}
237237
238238func (c connector ) Connect (context.Context ) (driver.Conn , error ) {
239- conn , err := pq .DialOpen (sqld {c .dialer , c .instance , c .dialOpts }, c .pqConn )
239+ conn , err := pq .DialOpen (dialer {c .dialer , c .instance , c .dialOpts }, c .pqConn )
240240 if err != nil {
241241 return nil , err
242242 }
@@ -247,18 +247,17 @@ func (c connector) Driver() driver.Driver {
247247 return otelsql .WrapDriver (pqDriver {c .dialer , c .instance , c .dialOpts , c .traceOpts }, c .traceOpts ... )
248248}
249249
250- // sqld implements pq.Dialer using the Cloud SQL Go Connector.
251- type sqld struct {
250+ type dialer struct {
252251 d * cloudsqlconn.Dialer
253252 instance string
254253 dialOpts []cloudsqlconn.DialOption
255254}
256255
257- func (d sqld ) Dial (network , address string ) (net.Conn , error ) {
256+ func (d dialer ) Dial (network , address string ) (net.Conn , error ) {
258257 return d .d .Dial (context .Background (), d .instance , d .dialOpts ... )
259258}
260259
261- func (d sqld ) DialTimeout (network , address string , timeout time.Duration ) (net.Conn , error ) {
260+ func (d dialer ) DialTimeout (network , address string , timeout time.Duration ) (net.Conn , error ) {
262261 return nil , errors .New ("gcppostgres: DialTimeout not supported" )
263262}
264263
0 commit comments