code: func (s *ReportStatus) Decode(r io.Reader) error {
  	scan := pktline.NewScanner(r)
  	if err := s.scanFirstLine(scan); err != nil {
  		return err
  	}
  
  	if err := s.decodeReportStatus(scan.Bytes()); err != nil {
  		return err
  	}
  
  	flushed := false
  	for scan.Scan() {
  		b := scan.Bytes()
  		if isFlush(b) {
  			flushed = true
  			break
  		}
  
  		if err := s.decodeCommandStatus(b); err != nil {
  			return err
  		}
  	}
  
  	if !flushed {
  		return fmt.Errorf("missing flush")
  	}
  
  	return scan.Err()
  }
docs: // Decode reads from the given reader and decodes a report-status message. It
  // does not read more input than what is needed to fill the report status.