Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
  • Loading branch information
xJack21 committed Mar 17, 2024
1 parent 856d742 commit 48424fe
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions sseread.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bufio"
"bytes"
"io"
"log"
)

// Read reads from an io.Reader, parses the data as Server-Sent Events, and invokes the provided callback function for each event.
Expand Down Expand Up @@ -38,7 +37,6 @@ func ReadCh(responseBody io.Reader) (messages <-chan *Event, err error) {
ev := new(Event)
for scanner.Scan() {
line := scanner.Bytes()
log.Println(string(line))
firstColonIndex := bytes.IndexByte(line, ':')
if firstColonIndex == -1 {
channel <- ev
Expand Down

0 comments on commit 48424fe

Please sign in to comment.