We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 13be9fa commit 1ff8900Copy full SHA for 1ff8900
src/io/io.go
@@ -74,6 +74,9 @@ var ErrNoProgress = errors.New("multiple Read calls return no data or error")
74
// that happen after reading some bytes and also both of the
75
// allowed EOF behaviors.
76
//
77
+// If len(p) == 0, Read should always return n == 0. It may return a
78
+// non-nil error if some error condition is known, such as EOF.
79
+//
80
// Implementations of Read are discouraged from returning a
81
// zero byte count with a nil error, except when len(p) == 0.
82
// Callers should treat a return of 0 and nil as indicating that
0 commit comments