cli-plugins/manager: remove uses of deprecated io/ioutil

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
(cherry picked from commit 6c06950cdf)
Signed-off-by: Cory Snider <csnider@mirantis.com>
This commit is contained in:
Sebastiaan van Stijn 2022-02-25 16:01:20 +01:00 committed by Cory Snider
parent d228386fa0
commit e501531b5f
1 changed files with 2 additions and 3 deletions

View File

@ -1,7 +1,6 @@
package manager package manager
import ( import (
"io/ioutil"
"os" "os"
"path/filepath" "path/filepath"
"sort" "sort"
@ -57,12 +56,12 @@ func getPluginDirs(dockerCli command.Cli) ([]string, error) {
} }
func addPluginCandidatesFromDir(res map[string][]string, d string) error { func addPluginCandidatesFromDir(res map[string][]string, d string) error {
dentries, err := ioutil.ReadDir(d) dentries, err := os.ReadDir(d)
if err != nil { if err != nil {
return err return err
} }
for _, dentry := range dentries { for _, dentry := range dentries {
switch dentry.Mode() & os.ModeType { switch dentry.Type() & os.ModeType {
case 0, os.ModeSymlink: case 0, os.ModeSymlink:
// Regular file or symlink, keep going // Regular file or symlink, keep going
default: default: