Skip to content

Commit

Permalink
Remove error return value from the unlock function.
Browse files Browse the repository at this point in the history
We defer the call to it so we can't really check exit status, and ignoring that causes lint failures.
  • Loading branch information
sfc-gh-kstewart committed Aug 21, 2024
1 parent f3ccc6f commit bfd6d51
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions pkg/stanza/fileconsumer/internal/reader/reader_other.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ func (r *Reader) tryLockFile() bool {
return true
}

func (r *Reader) unlockFile() error {
return nil
func (r *Reader) unlockFile() {
return
}
4 changes: 2 additions & 2 deletions pkg/stanza/fileconsumer/internal/reader/reader_unix.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

0 comments on commit bfd6d51

Please sign in to comment.