This commit is contained in:
2019-10-22 04:38:40 +05:00
parent f5b1f9d9f9
commit 61d34f3687
11 changed files with 51 additions and 16 deletions

View File

@@ -34,6 +34,7 @@ func Initialize() {
pathRaw = strings.Replace(pathRaw, "~", userHomeDir, 1)
}
absPath, err1 := filepath.Abs(pathRaw)
if err1 != nil {
log.Fatalln("Failed to get absolute path for configuration file: " + err1.Error())
@@ -46,6 +47,7 @@ func Initialize() {
}
Cfg = &config{}
err3 := yaml.Unmarshal(fileData, Cfg)
if err3 != nil {
log.Fatalln("Failed to parse configuration file: " + err3.Error())