Other: Update golangci-lint to v1.50.0

This commit is contained in:
Leander Beernaert
2022-10-17 11:02:56 +02:00
parent e0603f741f
commit 9d800324af
70 changed files with 247 additions and 277 deletions

View File

@ -18,7 +18,6 @@
package updater
import (
"io/ioutil"
"os"
"path/filepath"
"testing"
@ -104,10 +103,10 @@ func checkThatFilesAreSame(r *require.Assertions, src, dst string) {
r.Equal(srcLnk, dstLnk)
} else {
srcContent, err := ioutil.ReadFile(srcPath)
srcContent, err := os.ReadFile(srcPath)
r.NoError(err)
dstContent, err := ioutil.ReadFile(dstPath)
dstContent, err := os.ReadFile(dstPath)
r.NoError(err)
r.Equal(srcContent, dstContent)
@ -155,7 +154,7 @@ func createTestFolder(dirPath, dirType string) error {
path := filepath.Join(dirPath, "testpath")
switch dirType {
case FileType:
err = ioutil.WriteFile(path, []byte("This is a test"), 0o640)
err = os.WriteFile(path, []byte("This is a test"), 0o640)
if err != nil {
return err
}
@ -172,7 +171,7 @@ func createTestFolder(dirPath, dirType string) error {
return err
}
err = ioutil.WriteFile(filepath.Join(path, "another_file"), []byte("This is a test"), 0o640)
err = os.WriteFile(filepath.Join(path, "another_file"), []byte("This is a test"), 0o640)
if err != nil {
return err
}