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
package io | |
// Reader is the interface that wraps the basic Read method. | |
type Reader interface { | |
Read(p []byte) (n int, err error) | |
} | |
type multiReader struct { | |
readers []Reader | |
} | |
func (mr *multiReader) Read(p []byte) (n int, err error) { | |
// Blah blah blah. | |
return 0, EOF | |
} | |
// MultiReader returns a Reader that's the logical concatenation of the provided input readers. | |
func MultiReader(readers ...Reader) Reader { | |
r := make([]Reader, len(readers)) | |
copy(r, readers) | |
return &multiReader{r} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment