code: func (e *LoadDataInfo) getValidData(prevData, curData []byte) ([]byte, []byte) {
  	startingLen := len(e.LinesInfo.Starting)
  	if startingLen == 0 {
  		return prevData, curData
  	}
  
  	prevLen := len(prevData)
  	if prevLen > 0 {
  		// starting symbol in the prevData
  		idx := strings.Index(string(prevData), e.LinesInfo.Starting)
  		if idx != -1 {
  			return prevData[idx:], curData
  		}
  
  		// starting symbol in the middle of prevData and curData
  		restStart := curData
  		if len(curData) >= startingLen {
  			restStart = curData[:startingLen-1]
  		}
  		prevData = append(prevData, restStart...)
  		idx = strings.Index(string(prevData), e.LinesInfo.Starting)
  		if idx != -1 {
  			return prevData[idx:prevLen], curData
  		}
  	}
  
  	// starting symbol in the curData
  	idx := strings.Index(string(curData), e.LinesInfo.Starting)
  	if idx != -1 {
  		return nil, curData[idx:]
  	}
  
  	// no starting symbol
  	if len(curData) >= startingLen {
  		curData = curData[len(curData)-startingLen+1:]
  	}
  	return nil, curData
  }
docs: // getValidData returns prevData and curData that starts from starting symbol.
  // If the data doesn't have starting symbol, prevData is nil and curData is curData[len(curData)-startingLen+1:].
  // If curData size less than startingLen, curData is returned directly.