From fc8c5fdce62fb229202659408798a7b6c98f6e8b Mon Sep 17 00:00:00 2001 From: 简律纯 Date: Fri, 28 Apr 2023 01:36:55 +0800 Subject: --- cli/internal/util/closer.go | 15 --------------- 1 file changed, 15 deletions(-) delete mode 100644 cli/internal/util/closer.go (limited to 'cli/internal/util/closer.go') diff --git a/cli/internal/util/closer.go b/cli/internal/util/closer.go deleted file mode 100644 index 996760b..0000000 --- a/cli/internal/util/closer.go +++ /dev/null @@ -1,15 +0,0 @@ -package util - -// CloseAndIgnoreError is a utility to tell our linter that we explicitly deem it okay -// to not check a particular error on closing of a resource. -// -// We use `errcheck` as a linter, which is super-opinionated about checking errors, -// even in places where we don't necessarily care to check the error. -// -// `golangci-lint` has a default ignore list for this lint problem (EXC0001) which -// can be used to sidestep this problem but it's possibly a little too-heavy-handed -// in exclusion. At the expense of discoverability, this utility function forces -// opt-in to ignoring errors on closing of things that can be `Close`d. -func CloseAndIgnoreError(closer interface{ Close() error }) { - _ = closer.Close() -} -- cgit v1.2.3-70-g09d2