19 lines
304 B
Go
19 lines
304 B
Go
package main
|
|
|
|
import (
|
|
"io"
|
|
"log"
|
|
"os"
|
|
"strings"
|
|
)
|
|
|
|
func main() {
|
|
r1 := strings.NewReader("first reader ")
|
|
r2 := strings.NewReader("second reader ")
|
|
r3 := strings.NewReader("third reader\n")
|
|
r := io.MultiReader(r1, r2, r3)
|
|
|
|
if _, err := io.Copy(os.Stdout, r); err != nil {
|
|
log.Fatal(err)
|
|
}
|
|
}
|