func readers() { r := strings.NewReader("Hello, Reader!") b := make([]byte, 8) for { n, err := r.Read(b) fmt.Printf("n = %v err = %v b = %v\n", n, err, b) fmt.Printf("b[:n] = %q\n", b[:n]) if err == io.EOF { break } } reader.Validate(MyReader{}) rot13test() s := strings.NewReader("Lbh penpxrq gur pbqr!") r13 := rot13Reader{s} io.Copy(os.Stdout, &r13) fmt.Println() }
func main() { reader.Validate(MyReader{}) }
func showReader2() { reader.Validate(MyReader{}) }
func ExerciseReaders() { reader.Validate(MyReader{}) }
func testReader() { reader.Validate(MyReader{}) }
func TestReader2(t *testing.T) { reader.Validate(MyReader{}) }