code: func (r *LiveReader) Next() bool {
  	for {
  		// If buildRecord returns a non-EOF error, its game up - the segment is
  		// corrupt. If buildRecord returns an EOF, we try and read more in
  		// fillBuffer later on. If that fails to read anything (n=0 && err=EOF),
  		// we return  EOF and the user can try again later. If we have a full
  		// page, buildRecord is guaranteed to return a record or a non-EOF; it
  		// has checks the records fit in pages.
  		if ok, err := r.buildRecord(); ok {
  			return true
  		} else if err != nil && err != io.EOF {
  			r.err = err
  			return false
  		}
  
  		// If we've filled the page and not found a record, this
  		// means records have started to span pages.  Shouldn't happen
  		// but does and until we found out why, we need to deal with this.
  		if r.permissive && r.writeIndex == pageSize && r.readIndex > 0 {
  			copy(r.buf[:], r.buf[r.readIndex:])
  			r.writeIndex -= r.readIndex
  			r.readIndex = 0
  			continue
  		}
  
  		if r.readIndex == pageSize {
  			r.writeIndex = 0
  			r.readIndex = 0
  		}
  
  		if r.writeIndex != pageSize {
  			n, err := r.fillBuffer()
  			if n == 0 || (err != nil && err != io.EOF) {
  				r.err = err
  				return false
  			}
  		}
  	}
  }
docs: // Next returns true if Record() will contain a full record.
  // If Next returns false, you should always checked the contents of Error().
  // Return false guarantees there are no more records if the segment is closed
  // and not corrupt, otherwise if Err() == io.EOF you should try again when more
  // data has been written.