<commit_before>package database

import (
	"database/sql"
	"fmt"

	_ "github.com/go-sql-driver/mysql"
	"github.com/steffen25/golang.zone/config"
)

type MySQLDB struct {
	*sql.DB
}

func NewMySQLDB(dbCfg config.MySQLConfig) (*MySQLDB, error) {
	//DSN := fmt.Sprintf("%s:%s@unix(/tmp/mysql.sock)/%s?parseTime=true", dbCfg.Username, dbCfg.Password, dbCfg.DatabaseName)
	dataSourceName := fmt.Sprintf("%s:%s@(%s)/%s?charset=%s&parseTime=true", dbCfg.Username, dbCfg.Password, "app_mysql:3306", dbCfg.DatabaseName, dbCfg.Encoding)
	fmt.Println("URL === " + dataSourceName)
	db, err := sql.Open("mysql", dataSourceName)
	if err != nil {
		return nil, err
	}

	return &MySQLDB{db}, nil
}<commit_msg>Removed the sql print statement<commit_after>package database

import (
	"database/sql"
	"fmt"

	_ "github.com/go-sql-driver/mysql"
	"github.com/steffen25/golang.zone/config"
)

type MySQLDB struct {
	*sql.DB
}

func NewMySQLDB(dbCfg config.MySQLConfig) (*MySQLDB, error) {
	//DSN := fmt.Sprintf("%s:%s@unix(/tmp/mysql.sock)/%s?parseTime=true", dbCfg.Username, dbCfg.Password, dbCfg.DatabaseName)
	dataSourceName := fmt.Sprintf("%s:%s@(%s)/%s?charset=%s&parseTime=true", dbCfg.Username, dbCfg.Password, "app_mysql:3306", dbCfg.DatabaseName, dbCfg.Encoding)
	db, err := sql.Open("mysql", dataSourceName)
	if err != nil {
		return nil, err
	}

	return &MySQLDB{db}, nil
}
{'fraction_non_alphanumeric': 0.17694566813509544, 'fraction_numerical': 0.00881057268722467, 'mean_word_length': 5.369158878504673, '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': '6464790', 'n_tokens_mistral': 541, 'n_tokens_neox': 519, 'n_words': 88}