This commit is contained in:
Oliver Davies 2025-07-31 20:18:43 +01:00
parent 33eb5e0bfc
commit 0aeb86cafb

View file

@ -12,15 +12,20 @@ type Config struct {
Directories []string `yaml:"directories"`
}
func main() {
func getConfigPath() string {
home, err := os.UserHomeDir()
if err != nil {
panic(err)
}
configPath := filepath.Join(home, ".config", "git-repo-updater", "config.yaml")
return filepath.Join(home, ".config", "git-repo-updater", "config.yaml")
}
func main() {
configPath := getConfigPath()
data, err := os.ReadFile(configPath)
if err != nil {
panic(err)
}