Skip to content

Commit 5275b97

Browse files
authored
Update event.go
1 parent 5e66ec2 commit 5275b97

File tree

1 file changed

+0
-9
lines changed

1 file changed

+0
-9
lines changed

event.go

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -121,16 +121,7 @@ func (e *Event) Write(p []byte) (int, error) {
121121

122122
// WriteString adds string data to the event.
123123
// Equivalent to calling Write([]byte(string))
124-
// Panics if provided with non-ascii input
125124
func (e *Event) WriteString(p string) {
126-
// check ASCII
127-
for _, c := range p {
128-
if c > unicode.MaxASCII {
129-
// TODO at next major version bump, convert this to return an error
130-
// instead of a blind panic
131-
panic("eventsource: WriteString: Attempt to write non-ascii string")
132-
}
133-
}
134125
// split event on newlines
135126
split := strings.Split(p, "\n")
136127
for _, entry := range split {

0 commit comments

Comments
 (0)