aboutsummaryrefslogtreecommitdiff
path: root/internal/feed/state.go
diff options
context:
space:
mode:
authorRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-25 17:54:41 +0200
committerRené 'Necoro' Neumann <necoro@necoro.eu>2020-04-25 17:54:41 +0200
commit5886c4396c7e24c8d86c0f18c2e7215f792e25fb (patch)
tree94f4bf00679cee58f59a78f9316459daf035dac9 /internal/feed/state.go
parent60ff245e6d965785d54a212b2a4ddd9b16159460 (diff)
downloadfeed2imap-go-5886c4396c7e24c8d86c0f18c2e7215f792e25fb.tar.gz
feed2imap-go-5886c4396c7e24c8d86c0f18c2e7215f792e25fb.tar.bz2
feed2imap-go-5886c4396c7e24c8d86c0f18c2e7215f792e25fb.zip
Shortcut: do nothing, if there is no feed left
Diffstat (limited to 'internal/feed/state.go')
-rw-r--r--internal/feed/state.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/feed/state.go b/internal/feed/state.go
index 8efef5e..2a0a1e1 100644
--- a/internal/feed/state.go
+++ b/internal/feed/state.go
@@ -82,3 +82,7 @@ func (state *State) RemoveUndue() {
}
}
}
+
+func (state *State) NumFeeds() int {
+ return len(state.feeds)
+}