mirror of
https://github.com/scratchfoundation/golangci-lint.git
synced 2025-08-01 17:09:18 -04:00
dev: replace ioutil with io and os (#2318)
This commit is contained in:
parent
e612577dfc
commit
e5cd59a607
21 changed files with 40 additions and 51 deletions
test
|
@ -1,7 +1,6 @@
|
|||
package test
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"os/exec"
|
||||
"path/filepath"
|
||||
|
@ -54,10 +53,10 @@ func TestFix(t *testing.T) {
|
|||
require.NoError(t, err)
|
||||
|
||||
testshared.NewLintRunner(t).RunWithYamlConfig(string(cfg), args...)
|
||||
output, err := ioutil.ReadFile(input)
|
||||
output, err := os.ReadFile(input)
|
||||
require.NoError(t, err)
|
||||
|
||||
expectedOutput, err := ioutil.ReadFile(filepath.Join(testdataDir, "fix", "out", filepath.Base(input)))
|
||||
expectedOutput, err := os.ReadFile(filepath.Join(testdataDir, "fix", "out", filepath.Base(input)))
|
||||
require.NoError(t, err)
|
||||
|
||||
require.Equal(t, string(expectedOutput), string(output))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue