code: func (r *walReader) next() bool {
  	if r.cur >= len(r.files) {
  		return false
  	}
  	cf := r.files[r.cur]
  
  	// Remember the offset after the last correctly read entry. If the next one
  	// is corrupted, this is where we can safely truncate.
  	r.lastOffset, r.err = cf.Seek(0, io.SeekCurrent)
  	if r.err != nil {
  		return false
  	}
  
  	et, flag, b, err := r.entry(cf)
  	// If we reached the end of the reader, advance to the next one
  	// and close.
  	// Do not close on the last one as it will still be appended to.
  	if err == io.EOF {
  		if r.cur == len(r.files)-1 {
  			return false
  		}
  		// Current reader completed, close and move to the next one.
  		if err := cf.Close(); err != nil {
  			r.err = err
  			return false
  		}
  		r.cur++
  		return r.next()
  	}
  	if err != nil {
  		r.err = err
  		return false
  	}
  
  	r.curType = et
  	r.curFlag = flag
  	r.curBuf = b
  	return r.err == nil
  }
docs: // next returns decodes the next entry pair and returns true
  // if it was successful.