From 640f339d3840605d1d77740ebde64352d2c2a10e Mon Sep 17 00:00:00 2001 From: "Diogo Franco (Kovensky)" Date: Sun, 14 Jul 2013 12:41:29 -0300 Subject: [PATCH] anidb: panic if the default cache dir can't be set Nothing works without a valid cache. --- cache.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/cache.go b/cache.go index c22199f..fff97cb 100644 --- a/cache.go +++ b/cache.go @@ -45,7 +45,9 @@ type cacheDir struct { } func init() { - SetCacheDir(path.Join(os.TempDir(), "anidb", "cache")) + if err := SetCacheDir(path.Join(os.TempDir(), "anidb", "cache")); err != nil { + panic(err) + } } var cache cacheDir -- 2.44.0