Skip to content

Latest commit

Β 

History

History
18 lines (14 loc) Β· 2.43 KB

File metadata and controls

18 lines (14 loc) Β· 2.43 KB

TODO

In Progress

Backlog

Completed

  • Skip release check in dev builds β€” Added AppVersion != "0.0" guard to the update check in main.go.
  • Add Telegram bot support, configurable like Slack β€” Created telegram/telegram.go package mirroring the Slack pattern (DB-queue-backed, ticker processor, HTTP POST to Bot API). Added Telegram type to types/config.go, YAML parsing in config/config.go, DB migration 003.sql for telegram_notification table, QueueTelegramNotification/ConsumeTelegramNotificationQueue in db/db.go. Wired into tasks/notify.go, tasks/context.go, and main.go. Added example config in config.yaml.
  • Increase unit test coverage β€” Added 18 new tests across utils/string_test.go, utils/time_test.go, and new db/db_test.go. Coverage: utils 63%, db 65%, crypto 80%. Coverage reports already generated by test.sh.
  • Fix typos in function names β€” Renamed ParseDuarionFromString β†’ ParseDurationFromString in utils/time.go and config/config.go. Renamed checkDfference β†’ checkDifference in tasks/site_changes.go. Fixed "Invalid duation" β†’ "Invalid duration" error message.
  • Cap processedHashes with a bounded set β€” Replaced []string with map[string]struct{} for O(1) lookups. Capped at 1000 entries; clears when full.
  • Fix nil pointer panic on item.PublishedParsed in RSS β€” Added nil check before dereferencing item.PublishedParsed in tasks/rss.go isIgnored(). Feeds without a date are no longer skipped as old.
  • Fix race conditions β€” Used TryLock() in task scheduler to skip if already running instead of piling up goroutines. Added sync.Mutex for processedHashes in site_changes.go. Replaced bare bool flags with sync.Once in rss.go and countdown.go.
  • Close HTTP response bodies properly everywhere β€” Added defer resp.Body.Close() in version_check.go, tasks/rss.go, tasks/site_changes.go. Added response.Body.Close() in slack/slack.go.
  • Replace log.Panic with log.Print + return in non-fatal paths β€” Changed db/db.go (all runtime methods return safe defaults on error, only NewDB panics), utils/http.go, slack/slack.go, tasks/rss.go, tasks/site_changes.go.
  • Fix SQL bug in RSS cleanup query β€” Changed > to < and + to - in date comparison so it deletes old rows not future ones. Added DB.Exec() method and switched from DB.Query() to DB.Exec() for the DELETE statement.