dev: replace ioutil with io and os ()

This commit is contained in:
Benjamin 2021-11-02 03:21:26 +08:00 committed by GitHub
parent e612577dfc
commit e5cd59a607
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
21 changed files with 40 additions and 51 deletions

View file

@ -2,7 +2,6 @@ package test
import (
"bufio"
"io/ioutil"
"os"
"os/exec"
"path/filepath"
@ -99,7 +98,7 @@ func TestGciLocal(t *testing.T) {
}
func saveConfig(t *testing.T, cfg map[string]interface{}) (cfgPath string, finishFunc func()) {
f, err := ioutil.TempFile("", "golangci_lint_test")
f, err := os.CreateTemp("", "golangci_lint_test")
require.NoError(t, err)
cfgPath = f.Name() + ".yml"