summaryrefslogtreecommitdiffstats
path: root/db/db.go
diff options
context:
space:
mode:
authorsiddharth ravikumar <s@ricketyspace.net>2026-04-01 21:12:16 -0400
committersiddharth ravikumar <s@ricketyspace.net>2026-04-01 21:12:26 -0400
commit91d58507e84dd14caef1d7d3edfd10275642a643 (patch)
tree5f298c282445ee76c4153edcbd9c2b33cec6f828 /db/db.go
parent85ca1ebc7de98da7db308309edbcccee85281520 (diff)
db: go fix
Diffstat (limited to 'db/db.go')
-rw-r--r--db/db.go8
1 files changed, 2 insertions, 6 deletions
diff --git a/db/db.go b/db/db.go
index c99bbea..4e17682 100644
--- a/db/db.go
+++ b/db/db.go
@@ -8,6 +8,7 @@ import (
"fmt"
"os"
"path"
+ "slices"
"sync"
"ricketyspace.net/fern/file"
@@ -87,12 +88,7 @@ func (fdb *FernDB) exists(feed, entry string) bool {
if _, ok := fdb.downloaded[feed]; !ok {
return false
}
- for _, e := range fdb.downloaded[feed] {
- if e == entry {
- return true
- }
- }
- return false
+ return slices.Contains(fdb.downloaded[feed], entry)
}
// Returns true if an `entry` for `feed` exists in the database; false