aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/cache/cache_v1.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2021-02-27 21:03:48 +0100
committerRené 'Necoro' Neumann <necoro@necoro.eu>2021-02-27 21:03:48 +0100
commit742fd5eb0e2d615ee526ba74fb59eb7ad5b3c6ea (patch)
tree3220a652156bae753c5e70e156d939447f8d2da0 /internal/feed/cache/cache_v1.go
parent5e7f2979e01916d6eca727710f24ea5d1646faea (diff)
downloadfeed2imap-go-742fd5eb0e2d615ee526ba74fb59eb7ad5b3c6ea.tar.gz
feed2imap-go-742fd5eb0e2d615ee526ba74fb59eb7ad5b3c6ea.tar.bz2
feed2imap-go-742fd5eb0e2d615ee526ba74fb59eb7ad5b3c6ea.zip
Change from `transformToCurrent` to `transformTo`
Diffstat (limited to '')
-rw-r--r--internal/feed/cache/cache_v1.go9
1 files changed, 7 insertions, 2 deletions
diff --git a/internal/feed/cache/cache_v1.go b/internal/feed/cache/cache_v1.go
index cef26f6..7d95d4c 100644
--- a/internal/feed/cache/cache_v1.go
+++ b/internal/feed/cache/cache_v1.go
@@ -175,8 +175,13 @@ func newV1Cache() *v1Cache {
return &cache
}
-func (cache *v1Cache) transformToCurrent() (Impl, error) {
- return cache, nil
+func (cache *v1Cache) transformTo(v Version) (Impl, error) {
+ switch v {
+ case v1Version:
+ return cache, nil
+ default:
+ return nil, fmt.Errorf("Transformation not supported")
+ }
}
func (cache *v1Cache) getItem(id feedId) *cachedFeed {