@@ -38,7 +38,7 @@ type Config struct {
3838 Region string `yaml:"region"`
3939 Cluster string `yaml:"cluster"`
4040 Instance string `yaml:"instance"`
41- IPType sources.IPType `yaml:"ip_type "`
41+ IPType sources.IPType `yaml:"ipType "`
4242 User string `yaml:"user"`
4343 Password string `yaml:"password"`
4444 Database string `yaml:"database"`
@@ -83,18 +83,18 @@ func (s *Source) PostgresPool() *pgxpool.Pool {
8383 return s .Pool
8484}
8585
86- func getDialOpts (ip_type string ) ([]alloydbconn.DialOption , error ) {
87- switch strings .ToLower (ip_type ) {
86+ func getDialOpts (ipType string ) ([]alloydbconn.DialOption , error ) {
87+ switch strings .ToLower (ipType ) {
8888 case "private" :
8989 return []alloydbconn.DialOption {alloydbconn .WithPrivateIP ()}, nil
9090 case "public" :
9191 return []alloydbconn.DialOption {alloydbconn .WithPublicIP ()}, nil
9292 default :
93- return nil , fmt .Errorf ("invalid ip_type %s" , ip_type )
93+ return nil , fmt .Errorf ("invalid ipType %s" , ipType )
9494 }
9595}
9696
97- func initAlloyDBPgConnectionPool (ctx context.Context , tracer trace.Tracer , name , project , region , cluster , instance , ip_type , user , pass , dbname string ) (* pgxpool.Pool , error ) {
97+ func initAlloyDBPgConnectionPool (ctx context.Context , tracer trace.Tracer , name , project , region , cluster , instance , ipType , user , pass , dbname string ) (* pgxpool.Pool , error ) {
9898 //nolint:all // Reassigned ctx
9999 ctx , span := sources .InitConnectionSpan (ctx , tracer , SourceKind , name )
100100 defer span .End ()
@@ -107,7 +107,7 @@ func initAlloyDBPgConnectionPool(ctx context.Context, tracer trace.Tracer, name,
107107 }
108108
109109 // Create a new dialer with options
110- dialOpts , err := getDialOpts (ip_type )
110+ dialOpts , err := getDialOpts (ipType )
111111 if err != nil {
112112 return nil , err
113113 }
0 commit comments