code: func (s *syntheticByteStream) Read(p []byte) (int, error) {
  	s.mu.Lock()
  	defer s.mu.Unlock()
  
  	start := s.offset
  	end := start + int64(len(p))
  	var err error
  	if end >= s.size {
  		err = io.EOF
  		end = s.size
  	}
  
  	for idx := start; idx < end; idx++ {
  		p[idx-start] = s.factory(idx)
  	}
  
  	s.offset = end
  
  	return int(end - start), err
  }
docs: // Read implements the Reader interface for syntheticByteStream