Fix formatting

pull/68/head
L3af 2021-10-07 06:07:26 +13:00
parent b3fe72469e
commit cf6029ed11
1 changed files with 6 additions and 6 deletions

12
main.go
View File

@ -36,18 +36,18 @@ var (
func main() {
homedir, _ = os.UserHomeDir()
confDir = getenv("XDG_CONFIG_HOME", homedir + "/.config")
confDir = getenv("XDG_CONFIG_HOME", homedir + "/.config")
curuser, _ = user.Current()
preloadPath = strings.Replace(preloadPath, "~", homedir, 1)
sampleConfPath = strings.Replace(sampleConfPath, "~", homedir, 1)
if defaultConfDir == "" {
// we'll add *our* default if its empty (wont be if its changed comptime)
if _, err := os.Stat(filepath.Join(confDir, "hilbish", "hilbishrc.lua")); os.IsNotExist(err) {
defaultConfPath = filepath.Join(homedir, "/.hilbishrc.lua")
} else {
defaultConfPath = filepath.Join(confDir, "hilbish", "hilbishrc.lua")
}
if _, err := os.Stat(filepath.Join(confDir, "hilbish", "hilbishrc.lua")); os.IsNotExist(err) {
defaultConfPath = filepath.Join(homedir, "/.hilbishrc.lua")
} else {
defaultConfPath = filepath.Join(confDir, "hilbish", "hilbishrc.lua")
}
} else {
// else do ~ substitution
defaultConfPath = filepath.Join(strings.Replace(defaultConfDir, "~", homedir, 1), ".hilbishrc.lua")