<commit_before>package helpers

import (
	"math/rand"
	"strings"
	"sync"
	"time"
)

const (
	letterBytes   = "abcdefghijklmnopqrstuvwxyz"
	randSuffixLen = 8
	sep = "-"
)

var (
	r        *rand.Rand
	rndMutex *sync.Mutex
	once     sync.Once
)

func initSeed() {
	seed := time.Now().UTC().UnixNano()
	r = rand.New(rand.NewSource(seed))
	rndMutex = &sync.Mutex{}
}

func AppendRandomString(prefix string) string {
	once.Do(initSeed)
	suffix := make([]byte, randSuffixLen)

	rndMutex.Lock()
	defer rndMutex.Unlock()<commit_msg>golang format tools (#276)<commit_after>package helpers

import (
	"math/rand"
	"strings"
	"sync"
	"time"
)

const (
	letterBytes   = "abcdefghijklmnopqrstuvwxyz"
	randSuffixLen = 8
	sep           = "-"
)

var (
	r        *rand.Rand
	rndMutex *sync.Mutex
	once     sync.Once
)

func initSeed() {
	seed := time.Now().UTC().UnixNano()
	r = rand.New(rand.NewSource(seed))
	rndMutex = &sync.Mutex{}
}

func AppendRandomString(prefix string) string {
	once.Do(initSeed)
	suffix := make([]byte, randSuffixLen)

	rndMutex.Lock()
	defer rndMutex.Unlock()
{'fraction_non_alphanumeric': 0.146866230121609, 'fraction_numerical': 0.004677268475210477, 'mean_word_length': 3.7767857142857144, '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': '6499037', 'n_tokens_mistral': 448, 'n_tokens_neox': 443, 'n_words': 80}