1
0
Fork 0
mirror of https://github.com/moby/moby.git synced 2022-11-09 12:21:53 -05:00

Merge pull request #43104 from kzys/no-ioutil

Remove io/ioutil again
This commit is contained in:
Sebastiaan van Stijn 2021-12-23 21:08:52 +01:00 committed by GitHub
commit 10aecb0e65
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 3 deletions

View file

@ -2,7 +2,6 @@ package local
import (
"io"
"io/ioutil"
"os"
"testing"
@ -23,7 +22,7 @@ func TestDecode(t *testing.T) {
}
func testDecode(t *testing.T, buf []byte, split int) {
fw, err := ioutil.TempFile("", t.Name())
fw, err := os.CreateTemp("", t.Name())
assert.NilError(t, err)
defer os.Remove(fw.Name())

View file

@ -1,6 +1,7 @@
linters:
enable:
- deadcode
- depguard
- goimports
- golint
- gosec
@ -31,7 +32,13 @@ linters:
linters-settings:
govet:
check-shadowing: false
depguard:
list-type: blacklist
include-go-root: true
packages:
# The io/ioutil package has been deprecated.
# https://go.dev/doc/go1.16#ioutil
- io/ioutil
issues:
# The default exclusion rules are a bit too permissive, so copying the relevant ones below
exclude-use-default: false