<commit_before>package main

import (
	"bytes"
	"fmt"
	"sort"
	"time"

	"github.com/dvrkps/dojo/pills/medicament"
)

// Data holds pills data.
type Data []*medicament.Medicament

// Add adds pill.
func (d *Data) Add(in []byte, cd time.Time) error {
	m, err := medicament.New(cd, in)
	if err != nil {
		return fmt.Errorf("data: %s", err)
	}

	*d = append(*d, &m)

	return nil
}

// String return formated list of pills.
func (d Data) String() string {
	buf := bytes.NewBuffer(nil)

	for _, p := range d {
		_, _ = fmt.Fprint(buf, p)
	}

	return buf.String()
}

func sortData(d Data) Data {
	sort.Slice(d, func(i, j int) bool {
		return d[i].DaysToExpire < d[j].DaysToExpire
	})

	return d
}<commit_msg>pills: rm pointer from Data type<commit_after>package main

import (
	"bytes"
	"fmt"
	"sort"
	"time"

	"github.com/dvrkps/dojo/pills/medicament"
)

// Data holds pills data.
type Data []medicament.Medicament

// Add adds pill.
func (d *Data) Add(in []byte, cd time.Time) error {
	m, err := medicament.New(cd, in)
	if err != nil {
		return fmt.Errorf("data: %v", err)
	}

	*d = append(*d, m)

	return nil
}

// String return formated list of pills.
func (d Data) String() string {
	buf := bytes.NewBuffer(nil)

	for _, p := range d {
		_, _ = fmt.Fprint(buf, p)
	}

	return buf.String()
}

func sortData(d Data) Data {
	sort.Slice(d, func(i, j int) bool {
		return d[i].DaysToExpire < d[j].DaysToExpire
	})

	return d
}
{'fraction_non_alphanumeric': 0.1613812544045102, 'fraction_numerical': 0.0, 'mean_word_length': 3.3292682926829267, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '565185', 'n_tokens_mistral': 600, 'n_tokens_neox': 576, 'n_words': 159}