Skip to content

Commit

Permalink
Merge 1391e27 into 5379f29
Browse files Browse the repository at this point in the history
  • Loading branch information
cassiobotaro committed Oct 11, 2018
2 parents 5379f29 + 1391e27 commit c044818
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion hub/demo.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
// add a query parameter named "jwt" set a "mercureAuthorization" cookie containing this token
// the Content-Type header will automatically be set according to the URL's extension
func demo(w http.ResponseWriter, r *http.Request) {
// JSON-LD is the prefered format
// JSON-LD is the preferred format
mime.AddExtensionType(".jsonld", "application/ld+json")

url := r.URL.String()
Expand Down
2 changes: 1 addition & 1 deletion hub/subscribe.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type claims struct {
func (h *Hub) SubscribeHandler(w http.ResponseWriter, r *http.Request) {
f, ok := w.(http.Flusher)
if !ok {
panic("The Reponse Writter must be an instance of Flusher.")
panic("The Response Writter must be an instance of Flusher.")
}

targets := []string{}
Expand Down
2 changes: 1 addition & 1 deletion hub/subscribe_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ func TestSubscribeNotAFlusher(t *testing.T) {

req := httptest.NewRequest("GET", "http://example.com/subscribe", nil)

assert.PanicsWithValue(t, "The Reponse Writter must be an instance of Flusher.", func() {
assert.PanicsWithValue(t, "The Response Writter must be an instance of Flusher.", func() {
hub.SubscribeHandler(&responseWriterMock{}, req)
})
}
Expand Down
2 changes: 1 addition & 1 deletion hub/subscriber.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ type Subscriber struct {
LastEventID string
}

// CanReceive checks if the update can be dispatched according to the given criterias
// CanReceive checks if the update can be dispatched according to the given criteria
func (s *Subscriber) CanReceive(u *Update) bool {
return s.isAuthorized(u) && s.isSubscribed(u)
}
Expand Down

0 comments on commit c044818

Please sign in to comment.