<commit_before>package context

//Setup calls all provided setup functions and return all raised errors
func Setup(setupFuncs ...SetupFunc) []error {
	var errs []error
	for _, v := range setupFuncs {
		if err := v(); err != nil {
			errs = append(errs, err)
		}
	}
	return errs
}<commit_msg>Add warning when the setup function raises error<commit_after>package context

import (
	"farm.e-pedion.com/repo/logger"
)

//Setup calls all provided setup functions and return all raised errors
func Setup(setupFuncs ...SetupFunc) []error {
	var errs []error
	for i, v := range setupFuncs {
		if err := v(); err != nil {
			logger.Warn("contex.Setup",
				logger.Int("index", i),
				logger.Struct("func", v),
				logger.Err(err),
			)
			errs = append(errs, err)
		}
	}
	return errs
}
{'fraction_non_alphanumeric': 0.13127413127413126, 'fraction_numerical': 0.0, 'mean_word_length': 3.5497076023391814, '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': '7500734', 'n_tokens_mistral': 279, 'n_tokens_neox': 257, 'n_words': 84}