<commit_before>package lib

import (
	"encoding/base64"
	"fmt"
	"io/ioutil"
	"os"
	"strings"
)

func GetKey(path string) string {

	_, err := os.Stat(path)
	if err != nil {
		Error.Printf("Can't find key: %s\n", path)
		return ""
	}

	strkey, err := ioutil.ReadFile(path)
	if err != nil {
		Error.Printf("Can't load key: %s\n", err)
		return ""
	}

	return strings.TrimRight(string(strkey)[:], "\n")
}

func F2Base64(path string) (string, error) {

	raw, err := ioutil.ReadFile(path)
	if err != nil {
		return "", fmt.Errorf("Can't load markdown: %s", err)
	}
	return base64.StdEncoding.EncodeToString(raw), nil
}<commit_msg>cosmetic<commit_after>package lib

import (
	"encoding/base64"
	"fmt"
	"io/ioutil"
	"os"
	"strings"
)

func GetKey(path string) string {

	_, err := os.Stat(path)
	if err != nil {
		Error.Printf("Can't find key: %s\n", path)
		return ""
	}

	strkey, err := ioutil.ReadFile(path)
	if err != nil {
		Error.Printf("Can't load key: %s\n", err)
		return ""
	}

	return strings.TrimRight(string(strkey)[:], "\n")
}

func F2Base64(path string) (string, error) {

	raw, err := ioutil.ReadFile(path)
	if err != nil {
		return "", fmt.Errorf("Can't load file to encode: %s", err)
	}
	return base64.StdEncoding.EncodeToString(raw), nil
}
{'fraction_non_alphanumeric': 0.1774580335731415, 'fraction_numerical': 0.011191047162270184, 'mean_word_length': 3.9098039215686273, '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': '4839539', 'n_tokens_mistral': 531, 'n_tokens_neox': 502, 'n_words': 118}