<commit_before>package main

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

type ServerConfiguration struct {
	ServerPort            string   `json:"server_port"`
	StatusPort            string   `json:"status_port"`
	SourceDomain          string   `json:"source_domain"`
	WhitelistedExtensions []string `json:"whitelisted_extensions"`
	MaximumWidth          int      `json:"maximum_width"`
	Environment           string
}

func loadServerConfiguration(environment string) (*ServerConfiguration, error) {
	path := "config/" + environment + ".json"
	configFile, err := ioutil.ReadFile(path)
	if err != nil {
		return nil, fmt.Errorf("configuration error: %v\n", err)
	}

	var config *ServerConfiguration
	json.Unmarshal(configFile, &config)

	log.Printf(" Config: %v", config)
	return config, nil
}<commit_msg>Server configuration save environment<commit_after>package main

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

type ServerConfiguration struct {
	ServerPort            string   `json:"server_port"`
	StatusPort            string   `json:"status_port"`
	SourceDomain          string   `json:"source_domain"`
	WhitelistedExtensions []string `json:"whitelisted_extensions"`
	MaximumWidth          int      `json:"maximum_width"`
	Environment           string
}

func loadServerConfiguration(environment string) (*ServerConfiguration, error) {
	path := "config/" + environment + ".json"
	configFile, err := ioutil.ReadFile(path)
	if err != nil {
		return nil, fmt.Errorf("configuration error: %v\n", err)
	}

	var config *ServerConfiguration
	json.Unmarshal(configFile, &config)
	config.Environment = environment

	return config, nil
}
{'fraction_non_alphanumeric': 0.11272727272727273, 'fraction_numerical': 0.0, 'mean_word_length': 3.928358208955224, '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': '6308979', 'n_tokens_mistral': 493, 'n_tokens_neox': 480, 'n_words': 120}