Memos is an open-source, self-hosted note-taking app that brings your everyday thoughts together in a personal timeline. Your data stays yours, and you choose what to keep private or share.
Go dockerfossgomarkdownmemomicroblognote-takingnotesopen-sourceown-your-datareactself-hostedsqlitetimeline
refactor: use slices.Contains to simplify code (#6069)
weifanglab9fae524221f9
diff --git a/internal/scheduler/parser.go b/internal/scheduler/parser.goindex 20e889d3a..16197343e 100644--- a/internal/scheduler/parser.go+++ b/internal/scheduler/parser.go@@ -1,6 +1,7 @@package schedulerimport (+ "slices""strconv""strings""time"@@ -208,12 +209,7 @@ type listMatcher struct {}func (m *listMatcher) matches(value int) bool {- for _, v := range m.values {- if v == value {- return true- }- }- return false+ return slices.Contains(m.values, value)}// stepMatcher matches values at regular intervals.