diff --git a/main.go b/main.go index 02c569c..2826d08 100644 --- a/main.go +++ b/main.go @@ -558,7 +558,7 @@ func connectToPostgreSQL(pgConnStr string) error { } // Perform DB migrations - err = MigrateFS(db, migrations.FS, ".") + err = migrateFS(db, migrations.FS, ".") if err != nil { log.Fatal(err) } @@ -577,7 +577,7 @@ func connectToPostgreSQL(pgConnStr string) error { return nil } -func Migrate(db *sql.DB, dir string) error { +func migrate(db *sql.DB, dir string) error { err := goose.SetDialect("postgres") if err != nil { return fmt.Errorf("migrate: %w", err) @@ -590,7 +590,7 @@ func Migrate(db *sql.DB, dir string) error { } -func MigrateFS(db *sql.DB, migrationFS fs.FS, dir string) error { +func migrateFS(db *sql.DB, migrationFS fs.FS, dir string) error { // In case the dir is an empty string, they probably meant the current directory and goose wants a period for that. if dir == "" { dir = "." @@ -600,5 +600,5 @@ func MigrateFS(db *sql.DB, migrationFS fs.FS, dir string) error { // Ensure that we remove the FS on the off chance some other part of our app uses goose for migrations and doesn't want to use our FS. goose.SetBaseFS(nil) }() - return Migrate(db, dir) + return migrate(db, dir) }