<commit_before>package config

import (
	"encoding/json"
	"io/ioutil"
)

type argument struct {
	Description string      `json:"description"`
	Default     interface{} `json:"default"`
	EnvName     string      `json:"env_name"`
	FlagName    string      `json:"flag_name"`
	Type        string      `json:"type"`
	Required    bool        `json:"required"`
}

func parseJSON(filename string) (map[string]argument, error) {
	b, err := ioutil.ReadFile(filename)
	if err != nil {
		return nil, err
	}

	var c map[string]argument
	if err := json.Unmarshal(b, &c); err != nil {
		return nil, err
	}

	return c, nil
}
<commit_msg>making the configuration match case insensitive<commit_after>package config

import (
	"encoding/json"
	"io/ioutil"
	"strings"
)

type argument struct {
	Description string      `json:"description"`
	Default     interface{} `json:"default"`
	EnvName     string      `json:"env_name"`
	FlagName    string      `json:"flag_name"`
	Type        string      `json:"type"`
	Required    bool        `json:"required"`
}

func parseJSON(filename string) (map[string]argument, error) {
	b, err := ioutil.ReadFile(filename)
	if err != nil {
		return nil, err
	}

	var c map[string]argument
	if err := json.Unmarshal(b, &c); err != nil {
		return nil, err
	}

	ci := map[string]argument{}
	for k, v := range c {
		ci[strings.ToLower(k)] = v
	}

	return ci, nil
}

{'fraction_non_alphanumeric': 0.13202042304886943, 'fraction_numerical': 0.0, 'mean_word_length': 3.300940438871473, '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': '438685', 'n_tokens_mistral': 472, 'n_tokens_neox': 458, 'n_words': 125}