Skip to content

Commit

Permalink
chore: fix linters
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Aug 10, 2022
1 parent df2b2ce commit e16de2e
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: '1.18'
go-version: '1.19'

- uses: actions/cache@v2
with:
Expand Down
2 changes: 2 additions & 0 deletions subscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ import (
)

// SubscribeHandler creates a keep alive connection and sends the events to the subscribers.
//
//nolint:funlen,gocognit
func (h *Hub) SubscribeHandler(w http.ResponseWriter, r *http.Request) {
assertFlusher(w)

Expand Down
4 changes: 3 additions & 1 deletion subscribe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -797,13 +797,15 @@ func TestSubscribeExpires(t *testing.T) {
jwt, err := token.SignedString(hub.subscriberJWT.key)
require.Nil(t, err)

req := httptest.NewRequest("GET", defaultHubURL+"?topic=foo", nil)
req := httptest.NewRequest(http.MethodGet, defaultHubURL+"?topic=foo", nil)
req.Header.Add("Authorization", "Bearer "+jwt)

w := httptest.NewRecorder()
hub.SubscribeHandler(w, req)

resp := w.Result()
defer resp.Body.Close()

assert.Equal(t, 200, resp.StatusCode)
}

Expand Down

0 comments on commit e16de2e

Please sign in to comment.