From e8bd81f7cd4b6e9ba5943dd25f89d7653c280937 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Sun, 4 Jun 2023 18:39:52 +0200 Subject: [PATCH] chore: fix lint (#781) --- .golangci.yml | 1 + publish_test.go | 2 +- subscribe.go | 1 + subscription.go | 2 +- 4 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.golangci.yml b/.golangci.yml index bea5ef86..9af3fc36 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -19,6 +19,7 @@ linters: - nonamedreturns - testableexamples - musttag + - depguard # Weird issues - nolintlint diff --git a/publish_test.go b/publish_test.go index 70dd83ec..399e0341 100644 --- a/publish_test.go +++ b/publish_test.go @@ -319,7 +319,7 @@ func FuzzPublish(f *testing.F) { } for _, tc := range testCases { - f.Add(tc...) + f.Add(tc...) //nolint:govet } f.Fuzz(func(t *testing.T, topic1, topic2, id, data, private, retry, typ string) { diff --git a/subscribe.go b/subscribe.go index 1d1ca549..02801c48 100644 --- a/subscribe.go +++ b/subscribe.go @@ -224,6 +224,7 @@ func (h *Hub) write(w io.Writer, s zapcore.ObjectMarshaler, data string) bool { // wait for the dispatch goroutine to finish <-done + return false } } diff --git a/subscription.go b/subscription.go index c0c7d9b1..ddcddcb3 100644 --- a/subscription.go +++ b/subscription.go @@ -125,7 +125,7 @@ func (h *Hub) initSubscription(currentURL string, w http.ResponseWriter, r *http } w.WriteHeader(http.StatusInternalServerError) - return + return lastEventID, subscribers, ok } if r.Header.Get("If-None-Match") == lastEventID { w.WriteHeader(http.StatusNotModified)