From 099dad40d7d69ac7ba6abef606488f04c284f288 Mon Sep 17 00:00:00 2001 From: Reinaldy Rafli Date: Wed, 4 Sep 2024 08:06:35 +0700 Subject: [PATCH] chore: lint --- httpclient/sentryhttpclient_test.go | 4 +--- tracing_test.go | 6 ++---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/httpclient/sentryhttpclient_test.go b/httpclient/sentryhttpclient_test.go index fd99eb82..6bf61b7f 100644 --- a/httpclient/sentryhttpclient_test.go +++ b/httpclient/sentryhttpclient_test.go @@ -228,9 +228,7 @@ func TestIntegration(t *testing.T) { } } - if foundMatch { - continue - } else { + if !foundMatch { t.Errorf("Span mismatch (-want +got):\n%s", strings.Join(diffs, "\n")) } } diff --git a/tracing_test.go b/tracing_test.go index 0cea0975..074a8ce4 100644 --- a/tracing_test.go +++ b/tracing_test.go @@ -1099,10 +1099,8 @@ func TestGetSpanFromContext(t *testing.T) { value := GetSpanFromContext(span.Context()) if value == nil { t.Error("expecting `value` to be not nil") - } else { - if span.Op != "something" { - t.Errorf("expecting `span.Op` to be 'something', instead got %q", span.Op) - } + } else if span.Op != "something" { + t.Errorf("expecting `span.Op` to be 'something', instead got %q", span.Op) } })