From eefdc799b929a4d6407737d281c34dd940e2823f Mon Sep 17 00:00:00 2001 From: René 'Necoro' Neumann Date: Sat, 20 Jun 2020 22:37:44 +0200 Subject: print-cache: Tool for printing the contents of the cache --- internal/feed/cache.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'internal/feed/cache.go') diff --git a/internal/feed/cache.go b/internal/feed/cache.go index 5674de4..45cefd0 100644 --- a/internal/feed/cache.go +++ b/internal/feed/cache.go @@ -20,6 +20,8 @@ const ( type Cache interface { findItem(*Feed) CachedFeed Version() Version + Info() string + SpecificInfo(interface{}) string transformToCurrent() (Cache, error) } @@ -75,7 +77,7 @@ func newCache() (Cache, error) { return cacheForVersion(currentVersion) } -func loadCache(fileName string) (Cache, error) { +func LoadCache(fileName string) (Cache, error) { f, err := os.Open(fileName) if err != nil { if errors.Is(err, os.ErrNotExist) { -- cgit v1.2.3-54-g00ecf