Replacing several test util function with a generic version

ChangeLog:
  - updated several test utils with a generic PtrOf
  - updated references using iotils (Deprecated) with os equivalent import.
This commit is contained in:
Samir Faci 2024-10-05 12:32:03 -04:00
parent 6a0798eb06
commit 99be328e9d
15 changed files with 144 additions and 211 deletions

View file

@ -10,7 +10,6 @@ import (
"github.com/go-jet/jet/v2/generator/sqlite"
"github.com/go-jet/jet/v2/internal/utils/errfmt"
"github.com/go-jet/jet/v2/tests/internal/utils/repo"
"io/ioutil"
"os"
"os/exec"
"strings"
@ -184,7 +183,7 @@ func initPostgresDB(dbType string, connectionString string) error {
}
func execFile(db *sql.DB, sqlFilePath string) error {
testSampleSql, err := ioutil.ReadFile(sqlFilePath)
testSampleSql, err := os.ReadFile(sqlFilePath)
if err != nil {
return fmt.Errorf("failed to read sql file - %s: %w", sqlFilePath, err)
}