Standard library / io
io.ErrNoProgress
Used by some readers or clients after repeated empty successful reads; callers should not assume every Reader reports this automatically. Expected stdout: 'true\n'.
Formal Syntax & Structure
go syntaxgo
var ErrNoProgress errorWorking Example
Example Snippetgo
package main
import ( "bufio" "fmt" "io")
type emptyReader struct{}
func (emptyReader) Read([]byte) (int, error) { return 0, nil }func main() { r := bufio.NewReader(emptyReader{}) _, e := r.Peek(1) fmt.Println(e == io.ErrNoProgress)}