Move to Go 1.19, remote io/util, fix data race and a flapper

Signed-off-by: Ivan Kozlovic <ivan@synadia.com>
This commit is contained in:
Ivan Kozlovic
2022-08-05 09:55:37 -06:00
parent be54b08afd
commit 3c9a7cc6e5
50 changed files with 294 additions and 304 deletions

View File

@@ -27,7 +27,6 @@ package conf
import (
"fmt"
"io/ioutil"
"os"
"path/filepath"
"strconv"
@@ -72,7 +71,7 @@ func Parse(data string) (map[string]interface{}, error) {
// ParseFile is a helper to open file, etc. and parse the contents.
func ParseFile(fp string) (map[string]interface{}, error) {
data, err := ioutil.ReadFile(fp)
data, err := os.ReadFile(fp)
if err != nil {
return nil, fmt.Errorf("error opening config file: %v", err)
}
@@ -86,7 +85,7 @@ func ParseFile(fp string) (map[string]interface{}, error) {
// ParseFileWithChecks is equivalent to ParseFile but runs in pedantic mode.
func ParseFileWithChecks(fp string) (map[string]interface{}, error) {
data, err := ioutil.ReadFile(fp)
data, err := os.ReadFile(fp)
if err != nil {
return nil, err
}