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:
parent
6a0798eb06
commit
99be328e9d
15 changed files with 144 additions and 211 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue