From c3fd6919a4941a76a7bd95af3a20d6a59e1f924e Mon Sep 17 00:00:00 2001 From: iurii Date: Tue, 22 Oct 2024 15:38:49 +0300 Subject: [PATCH] err must be func-local to not cause races --- beacon/goclient/goclient_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/beacon/goclient/goclient_test.go b/beacon/goclient/goclient_test.go index b822156ee0..989f57d56a 100644 --- a/beacon/goclient/goclient_test.go +++ b/beacon/goclient/goclient_test.go @@ -145,7 +145,7 @@ func mockServer(t *testing.T, onRequestFn func(r *http.Request) error) *httptest return } - err = onRequestFn(r) + err := onRequestFn(r) require.NoError(t, err) w.Header().Set("Content-Type", "application/json")