From 3694cb65c88c4bfa8e2de536f53be443c512cdba Mon Sep 17 00:00:00 2001 From: Jordan Moeser Date: Sat, 21 Oct 2023 18:25:41 +1000 Subject: [PATCH] Upgrade --- files/json_yaml_parse.go | 4 ++-- git/git.go | 3 +-- 2 files changed, 3 insertions(+), 4 deletions(-) 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) }