]> git.r.bdr.sh - rbdr/mobius/blobdiff - hotline/files.go
Replace deprecated ioutil
[rbdr/mobius] / hotline / files.go
index c4ba718b8fd23cf1319c39f6833fd71887646878..1eeef593b8536709708932245264da992a7d38aa 100644 (file)
@@ -4,7 +4,6 @@ import (
        "encoding/binary"
        "errors"
        "io/fs"
-       "io/ioutil"
        "os"
        "path/filepath"
        "regexp"
@@ -66,7 +65,7 @@ func getFileNameList(path string, ignoreList []string) (fields []Field, err erro
                        }
 
                        if rFile.IsDir() {
-                               dir, err := ioutil.ReadDir(filepath.Join(path, file.Name()))
+                               dir, err := os.ReadDir(filepath.Join(path, file.Name()))
                                if err != nil {
                                        return fields, err
                                }
@@ -88,7 +87,7 @@ func getFileNameList(path string, ignoreList []string) (fields []Field, err erro
                        }
 
                } else if file.IsDir() {
-                       dir, err := ioutil.ReadDir(filepath.Join(path, file.Name()))
+                       dir, err := os.ReadDir(filepath.Join(path, file.Name()))
                        if err != nil {
                                return fields, err
                        }