@@ -123,13 +123,13 @@ type readerOnError struct {
123
123
}
124
124
125
125
// NewReaderOnError returns a io.Reader that call the notify function when an
126
- // unexpected (!io.EOF) error happends , after call Read function.
126
+ // unexpected (!io.EOF) error happens , after call Read function.
127
127
func NewReaderOnError (r io.Reader , notify func (error )) io.Reader {
128
128
return & readerOnError {r , notify }
129
129
}
130
130
131
131
// NewReadCloserOnError returns a io.ReadCloser that call the notify function
132
- // when an unexpected (!io.EOF) error happends , after call Read function.
132
+ // when an unexpected (!io.EOF) error happens , after call Read function.
133
133
func NewReadCloserOnError (r io.ReadCloser , notify func (error )) io.ReadCloser {
134
134
return NewReadCloser (NewReaderOnError (r , notify ), r )
135
135
}
@@ -149,13 +149,13 @@ type writerOnError struct {
149
149
}
150
150
151
151
// NewWriterOnError returns a io.Writer that call the notify function when an
152
- // unexpected (!io.EOF) error happends , after call Write function.
152
+ // unexpected (!io.EOF) error happens , after call Write function.
153
153
func NewWriterOnError (w io.Writer , notify func (error )) io.Writer {
154
154
return & writerOnError {w , notify }
155
155
}
156
156
157
157
// NewWriteCloserOnError returns a io.WriteCloser that call the notify function
158
- //when an unexpected (!io.EOF) error happends , after call Write function.
158
+ //when an unexpected (!io.EOF) error happens , after call Write function.
159
159
func NewWriteCloserOnError (w io.WriteCloser , notify func (error )) io.WriteCloser {
160
160
return NewWriteCloser (NewWriterOnError (w , notify ), w )
161
161
}
0 commit comments