mirror of
https://github.com/Slug-Boi/cocommit.git
synced 2026-05-13 20:55:47 +00:00
chore: change to viper
This commit is contained in:
@@ -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")
|
||||
}
|
||||
|
||||
@@ -0,0 +1 @@
|
||||
Test content
|
||||
Reference in New Issue
Block a user