From 6c06950cdffa5f606b764fe3bc6918186383422f Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Fri, 25 Feb 2022 16:01:20 +0100 Subject: [PATCH] cli-plugins/manager: remove uses of deprecated io/ioutil Signed-off-by: Sebastiaan van Stijn --- cli-plugins/manager/manager.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/cli-plugins/manager/manager.go b/cli-plugins/manager/manager.go index 89727f7cac..28a0194279 100644 --- a/cli-plugins/manager/manager.go +++ b/cli-plugins/manager/manager.go @@ -1,7 +1,6 @@ package manager import ( - "io/ioutil" "os" "path/filepath" "sort" @@ -57,12 +56,12 @@ func getPluginDirs(dockerCli command.Cli) ([]string, error) { } func addPluginCandidatesFromDir(res map[string][]string, d string) error { - dentries, err := ioutil.ReadDir(d) + dentries, err := os.ReadDir(d) if err != nil { return err } for _, dentry := range dentries { - switch dentry.Mode() & os.ModeType { + switch dentry.Type() & os.ModeType { case 0, os.ModeSymlink: // Regular file or symlink, keep going default: