From 551022046cbc4d063e9dcac0800f273678576339 Mon Sep 17 00:00:00 2001 From: Eng Zer Jun Date: Fri, 17 Sep 2021 15:26:47 +0800 Subject: [PATCH] chore: enable depguard for io/ioutil package Signed-off-by: Eng Zer Jun --- .golangci.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 7eca5c37..494cf5ff 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -2,6 +2,13 @@ run: timeout: 2m linters-settings: + depguard: + list-type: blacklist + include-go-root: true + packages: + - io/ioutil + packages-with-error-message: + - io/ioutil: "The 'io/ioutil' package is deprecated. Use corresponding 'os' or 'io' functions instead." gci: local-prefixes: github.com/dexidp/dex goimports: @@ -13,6 +20,7 @@ linters: enable: - bodyclose - deadcode + - depguard - dogsled - exhaustive - exportloopref @@ -64,7 +72,6 @@ linters: # - scopelint # unused - # - depguard # - goheader # - gomodguard