From eb7986656c9247c60e50e43132e74ec6e637915f Mon Sep 17 00:00:00 2001 From: Bogdan Drutu Date: Fri, 15 Dec 2023 13:52:14 -0800 Subject: [PATCH] [chore] remove unnecessary local variable, can check directly error.As (#9125) Signed-off-by: Bogdan Drutu --- exporter/exporterhelper/retry_sender.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/exporter/exporterhelper/retry_sender.go b/exporter/exporterhelper/retry_sender.go index 6215a314d8d..31baad4590f 100644 --- a/exporter/exporterhelper/retry_sender.go +++ b/exporter/exporterhelper/retry_sender.go @@ -115,8 +115,7 @@ func (rs *retrySender) send(ctx context.Context, req Request) error { } throttleErr := throttleRetry{} - isThrottle := errors.As(err, &throttleErr) - if isThrottle { + if errors.As(err, &throttleErr) { backoffDelay = max(backoffDelay, throttleErr.delay) }