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)