Skip to content

Commit

Permalink
golangci-lint: prevent io/ioutil from being used
Browse files Browse the repository at this point in the history
The package has been deprecated since Go 1.16:

https://go.dev/doc/go1.16#ioutil

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Mar 9, 2022
1 parent 21e9e96 commit 9bcd3f6
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ run:
linters:
enable:
- deadcode
- depguard
- gofmt
- goimports
- revive
Expand All @@ -30,6 +31,13 @@ linters:
disable-all: true

linters-settings:
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
importas:
alias:
- pkg: "github.com/opencontainers/image-spec/specs-go/v1"
Expand Down

0 comments on commit 9bcd3f6

Please sign in to comment.