chore: change to viper

This commit is contained in:
Slug-Boi
2025-04-19 20:48:06 +02:00
parent b542561de1
commit c1b9e35851
5 changed files with 50 additions and 7 deletions
+1 -5
View File
@@ -14,11 +14,7 @@ import (
// An example of the author file can be found in the examples folder of the repo
func Find_authorfile() string {
if os.Getenv("author_file") == "" {
dirs, err := os.UserConfigDir()
if err != nil {
panic(fmt.Sprintf("Error getting user config directory: %v", err))
}
return (dirs + "/cocommit/authors.json")
return ConfigVar.GetAuthorFile()
} else {
return os.Getenv("author_file")
}