Stop using deprecated ioutil functions

This commit is contained in:
Katrina Verey
2022-08-10 16:59:18 -04:00
parent 416eed97c4
commit f6b72077c8
70 changed files with 322 additions and 362 deletions

View File

@@ -4,8 +4,8 @@
package parser
import (
"io"
iofs "io/fs"
"io/ioutil"
"path"
"strings"
@@ -54,7 +54,7 @@ func (l parser) readPath(path string, processContent contentProcessor) error {
if err := checkExtension(path, l.extensions); err != nil {
return err
}
b, err := ioutil.ReadAll(f)
b, err := io.ReadAll(f)
if err != nil {
return err
}
@@ -100,5 +100,5 @@ func (l parser) readFile(path string) ([]byte, error) {
}
defer f.Close()
return ioutil.ReadAll(f)
return io.ReadAll(f)
}