loop io.Reader for golang