code: func (c *RawKVClient) Scan(startKey, endKey []byte, limit int) (keys [][]byte, values [][]byte, err error) {
  	start := time.Now()
  	defer func() { tikvRawkvCmdHistogramWithRawScan.Observe(time.Since(start).Seconds()) }()
  
  	if limit > MaxRawKVScanLimit {
  		return nil, nil, errors.Trace(ErrMaxScanLimitExceeded)
  	}
  
  	for len(keys) < limit {
  		req := &tikvrpc.Request{
  			Type: tikvrpc.CmdRawScan,
  			RawScan: &kvrpcpb.RawScanRequest{
  				StartKey: startKey,
  				EndKey:   endKey,
  				Limit:    uint32(limit - len(keys)),
  			},
  		}
  		resp, loc, err := c.sendReq(startKey, req, false)
  		if err != nil {
  			return nil, nil, errors.Trace(err)
  		}
  		cmdResp := resp.RawScan
  		if cmdResp == nil {
  			return nil, nil, errors.Trace(ErrBodyMissing)
  		}
  		for _, pair := range cmdResp.Kvs {
  			keys = append(keys, pair.Key)
  			values = append(values, pair.Value)
  		}
  		startKey = loc.EndKey
  		if len(startKey) == 0 {
  			break
  		}
  	}
  	return
  }
docs: // Scan queries continuous kv pairs in range [startKey, endKey), up to limit pairs.
  // If endKey is empty, it means unbounded.
  // If you want to exclude the startKey or include the endKey, append a '\0' to the key. For example, to scan
  // (startKey, endKey], you can write:
  // `Scan(append(startKey, '\0'), append(endKey, '\0'), limit)`.