diff --git a/files/json_yaml_parse.go b/files/json_yaml_parse.go index 0eb9877..5d617c5 100644 --- a/files/json_yaml_parse.go +++ b/files/json_yaml_parse.go @@ -1,14 +1,14 @@ package files import ( - "io/ioutil" + "os" "github.com/rs/zerolog/log" ) func ParseJsonOrYamlFile(path string) ([]byte, error) { - data, err := ioutil.ReadFile(path) + data, err := os.ReadFile(path) if err != nil { log.Fatal().Err(err) return nil, err diff --git a/git/git.go b/git/git.go index fe9fed3..7ce9a09 100644 --- a/git/git.go +++ b/git/git.go @@ -1,7 +1,6 @@ package git import ( - "io/ioutil" "os" "github.com/go-git/go-git/v5" @@ -12,7 +11,7 @@ import ( ) func GetTempDir() string { - dir, err := ioutil.TempDir(os.TempDir(), "go-git-sync-") + dir, err := os.MkdirTemp(os.TempDir, "-git-sync")) if err != nil { log.Error().Err(err) }