receiver/parse/plain.go
func oldPlain(body []byte) ([]*points.Points, error) {
	result := make([]*points.Points, 4)

	reader := bytes.NewBuffer(body)

	for {
		line, err := reader.ReadBytes('\n')

		if err != nil && err != io.EOF {
			return result, err
		}

		if len(line) == 0 {
			break
		}

		if line[len(line)-1] != '\n' {
			return result, errors.New("unfinished line in file")
		}

		p, err := points.ParseText(string(line))

		if err != nil {
			return result, err
		}

		result = append(result, p)
	}

	return result, nil
}
func oldPlain(body []byte) ([]*points.Points, error) {
	result := make([]*points.Points, 4)

	reader := bytes.NewBuffer(body)

	for {
		line, err := reader.ReadBytes('\n')

		if err != nil && err != io.EOF {
			return result, err
		}

		if len(line) == 0 {
			break
		}

		if line[len(line)-1] != '\n' {
			return result, errors.New("unfinished line in file")
		}

		p, err := points.ParseText(string(line))

		if err != nil {
			return result, err
		}

		result = append(result, p)
	}

	return result, nil
}
// old version. for benchmarks only