You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// EOF is the error returned by Read when no more input is available.// (Read must return EOF itself, not an error wrapping EOF,// because callers will test for EOF using ==.)// Functions should return EOF only to signal a graceful end of input.// If the EOF occurs unexpectedly in a structured data stream,// the appropriate error is either [ErrUnexpectedEOF] or some other error// giving more detail.varEOF=errors.New("EOF")
however, Conn.reader (and probably others) wrap io.EOF:
func (c*Conn) reader(ctx context.Context) (_MessageType, _ io.Reader, errerror) {
defererrd.Wrap(&err, "failed to get reader")
// Wrap wraps err with fmt.Errorf if err is non nil.// Intended for use with defer and a named error return.// Inspired by https://github.com/golang/go/issues/32676.funcWrap(err*error, fstring, v...any) {
if*err!=nil {
*err=fmt.Errorf(f+": %w", append(v, *err)...)
}
}
Activity
fix: do not wrap io.EOF in errd.Wrap
fix: do not wrap io.EOF in errd.Wrap