mirror of
https://github.com/gesellix/Bose-SoundTouch.git
synced 2026-08-18 08:36:13 +00:00
Second piece of #591. Standalone package (pkg/service/updatecheck): GitHub releases API client, golang.org/x/mod/semver comparison (promoted from indirect to direct dependency), persisted state via datastore's UpdateCheckState. Dev/(devel)/dirty current versions skip the comparison entirely rather than guessing; prereleases are excluded even though GitHub's /releases/latest endpoint shouldn't return one anyway (defensive). Deliberately decoupled from handlers.Server/main.go: repo and current version are constructor arguments, not hardcoded, so a future CLI-side check could reuse this as a plain import rather than a rewrite (open question 2 in the design doc). Not wired into the service yet — nothing calls NewChecker/CheckNow outside tests. Refs #591