From 725682229e600b0e758975c58d142f1af11a0ce8 Mon Sep 17 00:00:00 2001 From: guangwu Date: Wed, 4 Oct 2023 02:22:21 +0800 Subject: [PATCH] chore: remove refs to deprecated io/ioutil (#615) Signed-off-by: guoguangwu --- ecr-login/cache/file.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ecr-login/cache/file.go b/ecr-login/cache/file.go index bc70693b..19dc33bb 100644 --- a/ecr-login/cache/file.go +++ b/ecr-login/cache/file.go @@ -16,7 +16,6 @@ package cache import ( "encoding/json" "fmt" - "io/ioutil" "os" "path/filepath" @@ -123,7 +122,7 @@ func (f *fileCredentialCache) fullFilePath() string { // This eliminates from reading partially written credential files, and reduces (but does not eliminate) concurrent // file access. There is not guarantee here for handling multiple writes at once since there is no out of process locking. func (f *fileCredentialCache) save(registryCache *RegistryCache) error { - file, err := ioutil.TempFile(f.path, ".config.json.tmp") + file, err := os.CreateTemp(f.path, ".config.json.tmp") if err != nil { return err }