Skip to content

Commit

Permalink
default cache path
Browse files Browse the repository at this point in the history
  • Loading branch information
jackharrhy committed Dec 26, 2024
1 parent e047a33 commit 4608a47
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,3 +24,5 @@ output
almanac.toml

dist/

*cache.json
3 changes: 3 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ func loadConfig() {
viper.SetConfigName("almanac")
viper.SetConfigType("toml")
viper.AddConfigPath(".")

viper.SetDefault("discord.cache_path", "discord_cache.json")

if err := viper.ReadInConfig(); err != nil {
var configFileNotFoundError viper.ConfigFileNotFoundError
if !errors.As(err, &configFileNotFoundError) {
Expand Down

0 comments on commit 4608a47

Please sign in to comment.