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,7 +4,7 @@
package kio
import (
"io/ioutil"
"os"
"path/filepath"
"strings"
"testing"
@@ -46,10 +46,10 @@ func TestIgnoreFilesMatcher_readIgnoreFile(t *testing.T) {
if writeIgnoreFile {
ignoreFilePath := filepath.Join(dir, ignoreFileName)
require.NoError(t, ioutil.WriteFile(ignoreFilePath, []byte(ignoreFileBody), 0600))
require.NoError(t, os.WriteFile(ignoreFilePath, []byte(ignoreFileBody), 0600))
}
testFilePath := filepath.Join(dir, testFileName)
require.NoError(t, ioutil.WriteFile(testFilePath, []byte{}, 0600))
require.NoError(t, os.WriteFile(testFilePath, []byte{}, 0600))
return dir, nil
},