From 67d8ddb10b6efa8502b9457ed62776420b437cfd Mon Sep 17 00:00:00 2001 From: Zapan Gao Date: Mon, 1 Apr 2024 00:02:19 +0800 Subject: [PATCH] Fixing type check bug --- limiter.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/limiter.go b/limiter.go index d7f1b8cb..4eff7b07 100644 --- a/limiter.go +++ b/limiter.go @@ -40,9 +40,9 @@ func newLimiterExceptions(l *Limiter) { // FileInput、KafkaInput have its own rate limiting. Unlike other inputs we not just dropping requests, we can slow down or speed up request emittion. switch input := l.plugin.(type) { - case FileInput: + case *FileInput: input.speedFactor = speedFactor - case KafkaInput: + case *KafkaInput: input.speedFactor = speedFactor } } @@ -66,9 +66,9 @@ func (l *Limiter) isLimitedExceptions() bool { } // Fileinput、Kafkainput have its own limiting algorithm switch l.plugin.(type) { - case FileInput: + case *FileInput: return true - case KafkaInput: + case *KafkaInput: return true default: return false