From bfd6d51260a09d63d114e459f5ee208c3dcf98d4 Mon Sep 17 00:00:00 2001 From: sfc-gh-kstewart Date: Wed, 21 Aug 2024 16:55:10 -0700 Subject: [PATCH] Remove error return value from the unlock function. We defer the call to it so we can't really check exit status, and ignoring that causes lint failures. --- pkg/stanza/fileconsumer/internal/reader/reader_other.go | 4 ++-- pkg/stanza/fileconsumer/internal/reader/reader_unix.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkg/stanza/fileconsumer/internal/reader/reader_other.go b/pkg/stanza/fileconsumer/internal/reader/reader_other.go index 80335581aae3..f0b25bdb9587 100644 --- a/pkg/stanza/fileconsumer/internal/reader/reader_other.go +++ b/pkg/stanza/fileconsumer/internal/reader/reader_other.go @@ -9,6 +9,6 @@ func (r *Reader) tryLockFile() bool { return true } -func (r *Reader) unlockFile() error { - return nil +func (r *Reader) unlockFile() { + return } diff --git a/pkg/stanza/fileconsumer/internal/reader/reader_unix.go b/pkg/stanza/fileconsumer/internal/reader/reader_unix.go index 2cb24aafa2df..dfb792554947 100644 --- a/pkg/stanza/fileconsumer/internal/reader/reader_unix.go +++ b/pkg/stanza/fileconsumer/internal/reader/reader_unix.go @@ -23,6 +23,6 @@ func (r *Reader) tryLockFile() bool { return true } -func (r *Reader) unlockFile() error { - return unix.Flock(int(r.file.Fd()), unix.LOCK_UN) +func (r *Reader) unlockFile() { + unix.Flock(int(r.file.Fd()), unix.LOCK_UN) }