From fd62216cbcb2db527a3a2d8f4c48a9febd4e6b6b Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Thu, 10 Mar 2022 01:47:41 +0100 Subject: [PATCH] golangci-lint: prevent io/ioutil from being used The package has been deprecated since Go 1.16: https://go.dev/doc/go1.16#ioutil Signed-off-by: Sebastiaan van Stijn --- .golangci.yml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.golangci.yml b/.golangci.yml index 348fedd9..7598d98c 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -12,6 +12,7 @@ linters: - gofmt - govet - deadcode + - depguard - goimports - ineffassign - misspell @@ -23,6 +24,15 @@ linters: - structcheck 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 + issues: exclude-rules: - linters: