From 59a784f326ae3e5cb11c362434889bc4ef7885ee Mon Sep 17 00:00:00 2001 From: Peter Stuifzand Date: Sat, 30 Jun 2018 15:45:35 +0200 Subject: [PATCH] Simplify code for deleting a channel --- cmd/eksterd/memory.go | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/cmd/eksterd/memory.go b/cmd/eksterd/memory.go index 362804b..de247fd 100644 --- a/cmd/eksterd/memory.go +++ b/cmd/eksterd/memory.go @@ -187,13 +187,8 @@ func (b *memoryBackend) ChannelsUpdate(uid, name string) microsub.Channel { func (b *memoryBackend) ChannelsDelete(uid string) { defer b.save() - if _, e := b.Channels[uid]; e { - delete(b.Channels, uid) - } - - if _, e := b.Feeds[uid]; e { - delete(b.Feeds, uid) - } + delete(b.Channels, uid) + delete(b.Feeds, uid) } func mapToAuthor(result map[string]string) *microsub.Card {