<commit_before>package main

import (
	"bytes"
	"reflect"
	"strings"
	"testing"
)

func strRepeat(s string) string {
	return strings.Repeat(s, idSize/2)
}

func byteRepeat(b byte) []byte {
	return bytes.Repeat([]byte{b}, idSize/2)
}

func TestIDFromString(t *testing.T) {
	for _, c := range []struct {
		in      string
		want    []byte
		wantErr bool
	}{
		{"", nil, true},
		{"invalidhex", nil, true},<commit_msg>tests: no need to use a slice<commit_after>package main

import (
	"bytes"
	"reflect"
	"strings"
	"testing"
)

func strRepeat(s string) string {
	return strings.Repeat(s, idSize/2)
}

func byteRepeat(b byte) []byte {
	return bytes.Repeat([]byte{b}, idSize/2)
}

func TestIDFromString(t *testing.T) {
	for _, c := range [...]struct {
		in      string
		want    []byte
		wantErr bool
	}{
		{"", nil, true},
		{"invalidhex", nil, true},
{'fraction_non_alphanumeric': 0.16056670602125148, 'fraction_numerical': 0.004722550177095631, 'mean_word_length': 3.7111111111111112, 'pattern_counts': {'":': 0, '<': 3, '<?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': '1628230', 'n_tokens_mistral': 336, 'n_tokens_neox': 323, 'n_words': 83}