<commit_before>package commands

import (
	"io"
	"log"
	"os"
	"os/user"
	"path/filepath"
	"strings"

	"github.com/Skarlso/go_aws_mine/utils"
	"github.com/Yitsushi/go-commander"
)

// Init is an init command
type Init struct{}

// Execute initializes everything.
func (i *Init) Execute(opts *commander.CommandHelper) {
	usr, err := user.Current()
	utils.CheckError(err)

	err = os.Mkdir(filepath.Join(usr.HomeDir, ".config", "go_aws_mine"), os.ModePerm)
	utils.CheckError(err)

	// Copy files from cfg folder to ./config/go_aws_mine.
	dst, err := os.Create(filepath.Join(usr.HomeDir, ".config", "go_aws_mine", "ec2_conf.json"))
	utils.CheckError(err)

	src := strings.NewReader(defaultEC2Config())

	if _, err = io.Copy(dst, src); err != nil {<commit_msg>Removing io.Copy, as it is now useless.<commit_after>package commands

import (
	"log"
	"os"
	"os/user"
	"path/filepath"

	"github.com/Skarlso/go_aws_mine/utils"
	"github.com/Yitsushi/go-commander"
)

// Init is an init command
type Init struct{}

// Execute initializes everything.
func (i *Init) Execute(opts *commander.CommandHelper) {
	usr, err := user.Current()
	utils.CheckError(err)

	err = os.Mkdir(filepath.Join(usr.HomeDir, ".config", "go_aws_mine"), os.ModePerm)
	utils.CheckError(err)

	// Copy files from cfg folder to ./config/go_aws_mine.
	dst, err := os.Create(filepath.Join(usr.HomeDir, ".config", "go_aws_mine", "ec2_conf.json"))
	utils.CheckError(err)

	if _, err = dst.WriteString(defaultEC2Config()); err != nil {
{'fraction_non_alphanumeric': 0.1592741935483871, 'fraction_numerical': 0.002688172043010753, 'mean_word_length': 4.5559701492537314, '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': '5140595', 'n_tokens_mistral': 574, 'n_tokens_neox': 562, 'n_words': 119}