Skip to content
This repository was archived by the owner on Feb 2, 2026. It is now read-only.

jnodorp/infinite

Repository files navigation

infinite

Infinite provides an io.Reader that never returns EOF. Instead, a pattern is repeated forever.

I needed this for performance testing of a streaming JSON parser.

Usage

r := infinite.NewReader([]byte("Hello infinity!"))

buf := make([]byte, 16)

r.Read(buf)
fmt.Println(string(buf))

r.Read(buf)
fmt.Println(string(buf))

// Output:
// Hello infinity!H
// ello infinity!He

About

Infinite provides an io.Reader that never returns EOF. Instead, a pattern is repeated forever.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors