Tour of Go exercise #22: Reader, what does the question mean?

Ah I understand XD

I think it would be better to say: “rewrite all values in []byte into 'A's”

package main

import "golang.org/x/tour/reader"

type MyReader struct{}

// TODO: Add a Read([]byte) (int, error) method to MyReader.
func (m MyReader) Read(b []byte) (i int, e error) {
    for x := range b {
        b[x] = 'A'
    }
    return len(b), nil
}

func main() {
    reader.Validate(MyReader{})
}

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)