Created
January 27, 2023 09:49
-
-
Save arriqaaq/82ad111086d97022f48fe4aa6b1f11cb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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