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

@ -4,7 +4,7 @@ import (
"database/sql"
"encoding/json"
"fmt"
"io/ioutil"
"os"
_ "github.com/lib/pq"
@ -90,7 +90,7 @@ func main() {
func jsonSave(path string, v interface{}) {
jsonText, _ := json.MarshalIndent(v, "", "\t")
err := ioutil.WriteFile(path, jsonText, 0644)
err := os.WriteFile(path, jsonText, 0644)
panicOnError(err)
}