~chrisppy/beagles-devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch
1

[PATCH] Check if feed exists when attempting delete

Details
Message ID
<20200718232910.3215-1-will.tiffany@gmail.com>
DKIM signature
missing
Download raw message
Patch: +5 -1
---
 db/db.go | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/db/db.go b/db/db.go
index 6b9af47..28d2c71 100644
--- a/db/db.go
+++ b/db/db.go
@@ -228,7 +228,11 @@ func (s *Storage) DeleteFeed(url string) error {
	}
	defer db.Close()

	items := s.Feeds[url].Items
	feed, ok := s.Feeds[url]
	if !ok {
		return fmt.Errorf("Feed does not exist")
	}
	items := feed.Items
	for _, key := range items {
		// Delete from item database
		if err := db.Update(func(tx *bolt.Tx) error {
-- 
2.27.0
Details
Message ID
<C4A58FVRHZNI.1OO73ZCOGZQHU@alpha>
In-Reply-To
<20200718232910.3215-1-will.tiffany@gmail.com> (view parent)
DKIM signature
missing
Download raw message
Thanks Will.  Just make sure to run make check before sending next time.
Reply to thread Export thread (mbox)