<commit_before>package gomposer

type LockGenerator struct {
	PackageRepo PackageRepository
}

func (lg LockGenerator) Generate(dependencies map[string]string) (Lock) {

	l := Lock{}
	for k, v := range dependencies {
		p, err := lg.PackageRepo.Find(k)
		if err != nil{
			// TODO remove
			panic(err)
		}
		l.Packages = append(l.Packages, p.Versions[v])
	}

	return l
}
<commit_msg>Add base for lock generator<commit_after>package gomposer

type LockGenerator struct {
	PackageRepo PackageRepository
}

func (lg LockGenerator) Generate(dependencies map[string]string) (Lock) {

	l := Lock{}
	p := []Version{}
	for k, v := range dependencies {
		p, err := lg.PackageRepo.Find(k)
		if err != nil{
			// TODO remove
			panic(err)
		}
		p = append(p, p.Versions[v])
	}

	return l
}

{'fraction_non_alphanumeric': 0.12853470437017994, 'fraction_numerical': 0.0, 'mean_word_length': 3.8385093167701863, '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': '6303743', 'n_tokens_mistral': 292, 'n_tokens_neox': 273, 'n_words': 74}