cosmetic changes

This commit is contained in:
Yevhen Odynets
2026-09-01 08:59:03 +03:00
parent 31febb9f56
commit 1884151eb0
8 changed files with 300 additions and 11134 deletions
+8 -1
View File
@@ -5,6 +5,7 @@ import (
"log"
"log/slog"
"path/filepath"
"runtime"
"slices"
"github.com/spf13/viper"
@@ -26,7 +27,13 @@ func New() {
configDir, _ := filepath.Abs(dir)
viper.AddConfigPath(configDir)
switch runtime.GOOS {
case "windows":
viper.AddConfigPath(configDir)
case "linux":
viper.AddConfigPath("/opt/sources/resource-scraper/config")
}
viper.SetConfigName(configName)
err := viper.ReadInConfig()
if err != nil { // Handle errors reading the config file