code: func TakeTsv(reader io.Reader, count int, f func([]string) error) (err error) {
  	scanner := bufio.NewScanner(reader)
  	for scanner.Scan() {
  		if count == 0 {
  			io.Copy(ioutil.Discard, reader)
  			return nil
  		}
  		parts := bytes.Split(scanner.Bytes(), []byte{'\t'})
  		var args []string
  		for _, p := range parts {
  			args = append(args, string(p))
  		}
  		if err = f(args); err != nil {
  			break
  		}
  		count--
  	}
  	if err != nil {
  		return fmt.Errorf("Failed to process tsv: %v\n", err)
  	}
  	if err = scanner.Err(); err != nil {
  		return fmt.Errorf("Failed to scan tsv: %v\n", err)
  	}
  	return nil
  }
docs: // message contains 3 kinds of data with the formats:
  //   the first 4 bytes is int32 flag
  //   if flag > 0
  //     actual data row bytes with length = flag
  //   else if flag == math.MinInt32
  //     end of partition: EOF(math.MinInt32)
  //   else
  //     meta data bytes with length = - flag
  // TakeTsv Reads and processes TSV lines.
  // If count is less than 0, all lines are processed.