<commit_before>package main

import (
	"flag"
	"fmt"
	"io/ioutil"
	"os"
	"path"
	"path/filepath"
	"strings"

	"github.com/disiqueira/gotree"
	"gopkg.in/ini.v1"
)

const (
	configFile = ".gorganizer-{lang}.ini"
)

var cfg *ini.File
var cfgFile string
var language string

func addToTree(folder, file string, tree *gotree.GTStructure) {

	newFile := gotree.GTStructure{Name: file}

	// append to parent, if exists
	for i, item := range tree.Items {
		if item.Name == folder {
			item.Items = append(item.Items, newFile)
			tree.Items[i] = item
			return
		}
	}

	// create parent if missing
	newFolder := gotree.GTStructure{Name: folder}
	newFolder.Items = append(newFolder.Items, newFile)
	tree.Items = append(tree.Items, newFolder)
}

type excludeListType []string

func (e excludeListType) checkExclude(ext string) bool {
	for _, item := range e {
		if item == ext {
			return true
		}
	}
	return false
}
<commit_msg>empty ext. is not exclude ext.<commit_after>package main

import (
	"flag"
	"fmt"
	"io/ioutil"
	"os"
	"path"
	"path/filepath"
	"strings"

	"github.com/disiqueira/gotree"
	"gopkg.in/ini.v1"
)

const (
	configFile = ".gorganizer-{lang}.ini"
)

var cfg *ini.File
var cfgFile string
var language string

func addToTree(folder, file string, tree *gotree.GTStructure) {

	newFile := gotree.GTStructure{Name: file}

	// append to parent, if exists
	for i, item := range tree.Items {
		if item.Name == folder {
			item.Items = append(item.Items, newFile)
			tree.Items[i] = item
			return
		}
	}

	// create parent if missing
	newFolder := gotree.GTStructure{Name: folder}
	newFolder.Items = append(newFolder.Items, newFile)
	tree.Items = append(tree.Items, newFolder)
}

type excludeListType []string

func (e excludeListType) checkExclude(ext string) bool {
	if ext == "" {
		return false
	}
	for _, item := range e {
		if item == ext {
			return true
		}
	}
	return false
}

{'fraction_non_alphanumeric': 0.1293057763645999, 'fraction_numerical': 0.0010598834128245894, 'mean_word_length': 3.627450980392157, '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': '1592299', 'n_tokens_mistral': 732, 'n_tokens_neox': 696, 'n_words': 179}