<commit_before>package configurations

import (
	"os"
	"os/user"
	"path"
)

var applicationName = "banksaurus"

// IsDev returns if in dev environment or not
func IsDev() bool {
	if os.Getenv("GO_BANK_CLI_DEV") == "true" {
		return true
	}
	return false
}

// DatabasePath returns the path nad name for the database
// taking into account the type of environment
func DatabasePath() (string, string) {
	dbName := "bank"
	if IsDev() {
		return dbName, os.TempDir()
	}

	return dbName, ApplicationHomePath()
}

// LogPath returns the path to the log file
func LogPath() string {
	return path.Join(ApplicationHomePath(), applicationName+".log")
}

// ApplicationHomePath builds the path to application data in the user home,
// something like ~/.bankservices
func ApplicationHomePath() string {
	usr, err := user.Current()
	if err != nil {
		// TODO: no panic here...
		panic(err)
	}
	return path.Join(usr.HomeDir, ".bankservices")
}<commit_msg>Fix for wrong application home path<commit_after>package configurations

import (
	"os"
	"os/user"
	"path"
)

var applicationName = "banksaurus"

// IsDev returns if in dev environment or not
func IsDev() bool {
	if os.Getenv("GO_BANK_CLI_DEV") == "true" {
		return true
	}
	return false
}

// DatabasePath returns the path nad name for the database
// taking into account the type of environment
func DatabasePath() (string, string) {
	dbName := "bank"
	if IsDev() {
		return dbName, os.TempDir()
	}

	return dbName, ApplicationHomePath()
}

// LogPath returns the path to the log file
func LogPath() string {
	return path.Join(ApplicationHomePath(), applicationName+".log")
}

// ApplicationHomePath builds the path to application data in the user home,
// something like ~/.bankservices
func ApplicationHomePath() string {
	usr, err := user.Current()
	if err != nil {
		// TODO: no panic here...
		panic(err)
	}
	return path.Join(usr.HomeDir, ".bank")
}
{'fraction_non_alphanumeric': 0.11801896733403583, 'fraction_numerical': 0.0, 'mean_word_length': 3.9973684210526317, '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': '2004614', 'n_tokens_mistral': 609, 'n_tokens_neox': 598, 'n_words': 209}