diff --git a/cmd/helm/dependency_update_test.go b/cmd/helm/dependency_update_test.go index 9f7b0f303..642c9aeca 100644 --- a/cmd/helm/dependency_update_test.go +++ b/cmd/helm/dependency_update_test.go @@ -17,7 +17,6 @@ package main import ( "fmt" - "io/ioutil" "os" "path/filepath" "strings" @@ -188,7 +187,7 @@ func TestDependencyUpdateCmd_DoNotDeleteOldChartsOnError(t *testing.T) { } // Make sure charts dir still has dependencies - files, err := ioutil.ReadDir(filepath.Join(dir(chartname), "charts")) + files, err := os.ReadDir(filepath.Join(dir(chartname), "charts")) if err != nil { t.Fatal(err) } diff --git a/cmd/helm/search_repo.go b/cmd/helm/search_repo.go index ba692a2e7..3a5a23848 100644 --- a/cmd/helm/search_repo.go +++ b/cmd/helm/search_repo.go @@ -22,6 +22,7 @@ import ( "fmt" "io" "io/ioutil" + "os" "path/filepath" "strings" @@ -340,7 +341,7 @@ func compListCharts(toComplete string, includeFiles bool) ([]string, cobra.Shell // listing the entire content of the current directory which will // be too many choices for the user to find the real repos) if includeFiles && len(completions) > 0 && len(toComplete) > 0 { - if files, err := ioutil.ReadDir("."); err == nil { + if files, err := os.ReadDir("."); err == nil { for _, file := range files { if strings.HasPrefix(file.Name(), toComplete) { // We are completing a file prefix diff --git a/internal/third_party/dep/fs/fs.go b/internal/third_party/dep/fs/fs.go index 832592197..4e4eacc60 100644 --- a/internal/third_party/dep/fs/fs.go +++ b/internal/third_party/dep/fs/fs.go @@ -33,7 +33,6 @@ package fs import ( "io" - "io/ioutil" "os" "path/filepath" "runtime" @@ -119,7 +118,7 @@ func CopyDir(src, dst string) error { return errors.Wrapf(err, "cannot mkdir %s", dst) } - entries, err := ioutil.ReadDir(src) + entries, err := os.ReadDir(src) if err != nil { return errors.Wrapf(err, "cannot read directory %s", dst) } diff --git a/pkg/action/lint.go b/pkg/action/lint.go index 2292c14bf..bdb93dcc2 100644 --- a/pkg/action/lint.go +++ b/pkg/action/lint.go @@ -96,7 +96,7 @@ func lintChart(path string, vals map[string]interface{}, namespace string, stric return linter, errors.Wrap(err, "unable to extract tarball") } - files, err := ioutil.ReadDir(tempDir) + files, err := os.ReadDir(tempDir) if err != nil { return linter, errors.Wrapf(err, "unable to read temporary output directory %s", tempDir) } diff --git a/pkg/downloader/manager.go b/pkg/downloader/manager.go index ff5f9c4e7..9491f41ad 100644 --- a/pkg/downloader/manager.go +++ b/pkg/downloader/manager.go @@ -870,7 +870,7 @@ func tarFromLocalDir(chartpath, name, repo, version string) (string, error) { // move files from tmppath to destpath func move(tmpPath, destPath string) error { - files, _ := ioutil.ReadDir(tmpPath) + files, _ := os.ReadDir(tmpPath) for _, file := range files { filename := file.Name() tmpfile := filepath.Join(tmpPath, filename)