Skip to content

Instantly share code, notes, and snippets.

@arriqaaq
Created January 27, 2023 09:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save arriqaaq/82ad111086d97022f48fe4aa6b1f11cb to your computer and use it in GitHub Desktop.
Save arriqaaq/82ad111086d97022f48fe4aa6b1f11cb to your computer and use it in GitHub Desktop.
import (
"io"
"strings"
)
func main() {
r1 := strings.NewReader("first reader ")
r2 := strings.NewReader("second reader ")
r3 := strings.NewReader("third reader")
r := io.MultiReader(r1, r2, r3)
io.Copy(os.Stdout, r)
// Output: first reader second reader third reader
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment