Skip to content

Commit 6462981

Browse files
author
Chris Hundt
committed
Address review comments
1 parent 43d9c3f commit 6462981

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

pgutils/pgutils.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import (
1414
// Given a postgres connection string, generate a new one with the search path
1515
// (https://www.postgresql.org/docs/17/ddl-schemas.html#DDL-SCHEMAS-PATH)
1616
// set to just the given schema name.
17-
func GetConnectionStringWithSearchPath(connStr, schemaName string) (string, error) {
17+
func getConnectionStringWithSearchPath(connStr, schemaName string) (string, error) {
1818
kvconn := connStr
1919
if strings.HasPrefix(connStr, "postgres://") || strings.HasPrefix(connStr, "postgresql://") {
2020
var err error
@@ -41,7 +41,7 @@ func GetConnectionStringWithSearchPath(connStr, schemaName string) (string, erro
4141
// (https://www.postgresql.org/docs/17/ddl-schemas.html#DDL-SCHEMAS-PATH)
4242
// set to just the given schema name.
4343
func ConnectWithSchema(dbConnectionString, schemaName string) (*sqlx.DB, error) {
44-
connStringWithSearchPath, err := GetConnectionStringWithSearchPath(dbConnectionString, schemaName)
44+
connStringWithSearchPath, err := getConnectionStringWithSearchPath(dbConnectionString, schemaName)
4545
if err != nil {
4646
return nil, fmt.Errorf("Error getting updated connection string: %w", err)
4747
}
@@ -77,7 +77,7 @@ func getSchemaName(testName string) string {
7777
// (https://www.postgresql.org/docs/17/ddl-schemas.html#DDL-SCHEMAS-PATH)
7878
// It also registers a cleanup function (https://pkg.go.dev/testing#T.Cleanup)
7979
// that will drop the schema after the test completes.
80-
func ReconnectWithSchemaForTest(dbConnectionString string, t *testing.T) *sqlx.DB {
80+
func ConnectWithSchemaForTest(dbConnectionString string, t *testing.T) *sqlx.DB {
8181
// Create test schema and set search path
8282
schemaName := getSchemaName(t.Name())
8383

0 commit comments

Comments
 (0)