From 4a57c9ea17a86e579751025cd0a7c2e6de374726 Mon Sep 17 00:00:00 2001 From: Lunny Xiao Date: Mon, 18 Oct 2021 03:47:12 +0800 Subject: Fix some lints (#17337) Fix some linting problems. --- modules/graceful/restart_unix.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'modules/graceful') diff --git a/modules/graceful/restart_unix.go b/modules/graceful/restart_unix.go index 392ed60cb3..9969e007c3 100644 --- a/modules/graceful/restart_unix.go +++ b/modules/graceful/restart_unix.go @@ -55,7 +55,9 @@ func RestartProcess() (int, error) { unixListener.SetUnlinkOnClose(false) } // Remember to close these at the end. - defer files[i].Close() + defer func(i int) { + _ = files[i].Close() + }(i) } // Use the original binary location. This works with symlinks such that if -- cgit v1.2.3