From f2dffd80896b0c20da441a6d4984a349a9b8a5f1 Mon Sep 17 00:00:00 2001 From: Daniel Mangum Date: Tue, 1 Aug 2023 11:56:09 -0400 Subject: [PATCH] Remove named return values Removes the named return values from replay detector implementations as they are not currently being used and could lead to erroneous assignment in the future. Signed-off-by: Daniel Mangum --- replaydetector/replaydetector.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/replaydetector/replaydetector.go b/replaydetector/replaydetector.go index 8d4909e..d407995 100644 --- a/replaydetector/replaydetector.go +++ b/replaydetector/replaydetector.go @@ -37,7 +37,7 @@ func New(windowSize uint, maxSeq uint64) ReplayDetector { } } -func (d *slidingWindowDetector) Check(seq uint64) (accept func() bool, ok bool) { +func (d *slidingWindowDetector) Check(seq uint64) (func() bool, bool) { if seq > d.maxSeq { // Exceeded upper limit. return nop, false @@ -85,7 +85,7 @@ type wrappedSlidingWindowDetector struct { init bool } -func (d *wrappedSlidingWindowDetector) Check(seq uint64) (accept func() bool, ok bool) { +func (d *wrappedSlidingWindowDetector) Check(seq uint64) (func() bool, bool) { if seq > d.maxSeq { // Exceeded upper limit. return nop, false