aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/cache.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-06-20 22:37:44 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-06-20 22:37:44 +0200
commiteefdc799b929a4d6407737d281c34dd940e2823f (patch)
tree8cf6b1842dc5ca6a5044c1b3caba0916b8328eca /internal/feed/cache.go
parent92f8d785ea478c02efd32f03478bcd11c85b40a4 (diff)
downloadfeed2imap-go-eefdc799b929a4d6407737d281c34dd940e2823f.tar.gz
feed2imap-go-eefdc799b929a4d6407737d281c34dd940e2823f.tar.bz2
feed2imap-go-eefdc799b929a4d6407737d281c34dd940e2823f.zip
print-cache: Tool for printing the contents of the cache
Diffstat (limited to 'internal/feed/cache.go')
-rw-r--r--internal/feed/cache.go4
1 files changed, 3 insertions, 1 deletions
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) {