We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e66ec2 commit 5275b97Copy full SHA for 5275b97
event.go
@@ -121,16 +121,7 @@ func (e *Event) Write(p []byte) (int, error) {
121
122
// WriteString adds string data to the event.
123
// Equivalent to calling Write([]byte(string))
124
-// Panics if provided with non-ascii input
125
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
134
// split event on newlines
135
split := strings.Split(p, "\n")
136
for _, entry := range split {
0 commit comments