aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/cache/cache.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.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.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/feed/cache/cache.go b/internal/feed/cache/cache.go
index e69e8f3..3a80df1 100644
--- a/internal/feed/cache/cache.go
+++ b/internal/feed/cache/cache.go
@@ -18,12 +18,12 @@ import (
type Version byte
const (
- currentVersion Version = 1
+ currentVersion Version = v1Version
)
type Impl interface {
cachedFeed(*feed.Feed) CachedFeed
- transformToCurrent() (Impl, error)
+ transformTo(Version) (Impl, error)
Version() Version
Info() string
SpecificInfo(interface{}) string
@@ -169,7 +169,7 @@ func Load(fileName string) (Cache, error) {
return Cache{}, fmt.Errorf("decoding for version '%d' from '%s': %w", version, fileName, err)
}
- if cache, err = cache.transformToCurrent(); err != nil {
+ if cache, err = cache.transformTo(currentVersion); err != nil {
return Cache{}, fmt.Errorf("cannot transform from version %d to %d: %w", version, currentVersion, err)
}