5353 postgresSANInvalidDomainName = os .Getenv ("POSTGRES_CUSTOMER_CAS_INVALID_DOMAIN_NAME" ) // Cloud SQL Postgres CAS domain name that IS NOT an instance Custom SAN of the postgresSANConnName instance.
5454)
5555
56- func AddIPTypeOptions (opts []cloudsqlconn.Option ) []cloudsqlconn.Option {
56+ func addIPTypeOptions (opts []cloudsqlconn.Option ) []cloudsqlconn.Option {
5757 if ipType == "private" {
5858 return append (opts , cloudsqlconn .WithDefaultDialOptions (cloudsqlconn .WithPrivateIP ()))
5959 }
@@ -110,7 +110,7 @@ func TestPostgresPgxPoolConnect(t *testing.T) {
110110
111111 // Use WithPrivateIP option if the ipType is set to private
112112 var opts []cloudsqlconn.Option
113- opts = AddIPTypeOptions (opts )
113+ opts = addIPTypeOptions (opts )
114114
115115 // Create a new dialer with any options
116116 d , err := cloudsqlconn .NewDialer (ctx , opts ... )
@@ -162,7 +162,7 @@ func TestPostgresCASConnect(t *testing.T) {
162162
163163 // Use WithPrivateIP option if the ipType is set to private
164164 var opts []cloudsqlconn.Option
165- opts = AddIPTypeOptions (opts )
165+ opts = addIPTypeOptions (opts )
166166
167167 // Create a new dialer with any options
168168 d , err := cloudsqlconn .NewDialer (ctx , opts ... )
@@ -214,7 +214,7 @@ func TestPostgresConnectWithQuotaProject(t *testing.T) {
214214
215215 // Use WithPrivateIP option if the ipType is set to private
216216 var opts []cloudsqlconn.Option
217- opts = AddIPTypeOptions (opts )
217+ opts = addIPTypeOptions (opts )
218218
219219 // Create a new dialer with any options
220220 d , err := cloudsqlconn .NewDialer (ctx , append (opts , cloudsqlconn .WithQuotaProject (project ))... )
@@ -266,7 +266,7 @@ func TestPostgresCustomerCASConnect(t *testing.T) {
266266
267267 // Use WithPrivateIP option if the ipType is set to private
268268 var opts []cloudsqlconn.Option
269- opts = AddIPTypeOptions (opts )
269+ opts = addIPTypeOptions (opts )
270270
271271 // Create a new dialer with any options
272272 d , err := cloudsqlconn .NewDialer (ctx , opts ... )
@@ -318,7 +318,7 @@ func TestPostgresMCPConnect(t *testing.T) {
318318
319319 // Use WithPrivateIP option if the ipType is set to private
320320 var opts []cloudsqlconn.Option
321- opts = AddIPTypeOptions (opts )
321+ opts = addIPTypeOptions (opts )
322322
323323 // Create a new dialer with any options
324324 d , err := cloudsqlconn .NewDialer (ctx , opts ... )
@@ -370,7 +370,7 @@ func TestPostgresSANDomainConnect(t *testing.T) {
370370
371371 // Use WithPrivateIP option if the ipType is set to private
372372 var opts []cloudsqlconn.Option
373- opts = AddIPTypeOptions (opts )
373+ opts = addIPTypeOptions (opts )
374374
375375 // Create a new dialer with any options
376376 d , err := cloudsqlconn .NewDialer (ctx , append (opts , cloudsqlconn .WithDNSResolver ())... )
@@ -423,7 +423,7 @@ func TestPostgresSANBadDomainCausesConnectError(t *testing.T) {
423423
424424 // Use WithPrivateIP option if the ipType is set to private
425425 var opts []cloudsqlconn.Option
426- opts = AddIPTypeOptions (opts )
426+ opts = addIPTypeOptions (opts )
427427
428428 // Create a new dialer with any options
429429 d , err := cloudsqlconn .NewDialer (ctx , append (opts , cloudsqlconn .WithDNSResolver ())... )
@@ -480,7 +480,7 @@ func TestPostgresPgxPoolConnectDomainName(t *testing.T) {
480480
481481 // Use WithPrivateIP option if the ipType is set to private
482482 var opts []cloudsqlconn.Option
483- opts = AddIPTypeOptions (opts )
483+ opts = addIPTypeOptions (opts )
484484
485485 // Create a new dialer with any options
486486 d , err := cloudsqlconn .NewDialer (ctx , append (opts , cloudsqlconn .WithDNSResolver ())... )
@@ -529,7 +529,7 @@ func TestPostgresConnectWithIAMUser(t *testing.T) {
529529
530530 // Use WithPrivateIP option if the ipType is set to private
531531 var opts []cloudsqlconn.Option
532- opts = AddIPTypeOptions (opts )
532+ opts = addIPTypeOptions (opts )
533533
534534 d , err := cloudsqlconn .NewDialer (ctx , append (opts , cloudsqlconn .WithIAMAuthN ())... )
535535 if err != nil {
@@ -572,7 +572,7 @@ func TestPostgresConnectWithLazyRefresh(t *testing.T) {
572572
573573 // Use WithPrivateIP option if the ipType is set to private
574574 var opts []cloudsqlconn.Option
575- opts = AddIPTypeOptions (opts )
575+ opts = addIPTypeOptions (opts )
576576
577577 d , err := cloudsqlconn .NewDialer (
578578 ctx ,
@@ -609,7 +609,7 @@ func TestPostgresEngineVersion(t *testing.T) {
609609
610610 // Use WithPrivateIP option if the ipType is set to private
611611 var opts []cloudsqlconn.Option
612- opts = AddIPTypeOptions (opts )
612+ opts = addIPTypeOptions (opts )
613613
614614 d , err := cloudsqlconn .NewDialer (context .Background (), opts ... )
615615 if err != nil {
@@ -628,7 +628,7 @@ func TestPostgresV5Hook(t *testing.T) {
628628
629629 // Use WithPrivateIP option if the ipType is set to private
630630 var opts []cloudsqlconn.Option
631- opts = AddIPTypeOptions (opts )
631+ opts = addIPTypeOptions (opts )
632632
633633 tests := []struct {
634634 driver string
@@ -696,7 +696,7 @@ func TestPostgresV4Hook(t *testing.T) {
696696
697697 // Use WithPrivateIP option if the ipType is set to private
698698 var opts []cloudsqlconn.Option
699- opts = AddIPTypeOptions (opts )
699+ opts = addIPTypeOptions (opts )
700700
701701 tests := []struct {
702702 driver string
@@ -797,7 +797,7 @@ func TestPostgresAuthentication(t *testing.T) {
797797 if ipType != "private" {
798798 creds = keyfile (t )
799799 }
800- opts = AddIPTypeOptions (opts )
800+ opts = addIPTypeOptions (opts )
801801 tok , path , cleanup := removeAuthEnvVar (t )
802802 defer cleanup ()
803803
0 commit comments