love update

This commit is contained in:
2026-02-28 12:59:15 +01:00
parent fb4e589b09
commit 2bf56e3c1b
3 changed files with 139 additions and 2 deletions
+6 -1
View File
@@ -11,12 +11,14 @@ type SoftwareUpdaterServiceInterface interface {
type SoftwareUpdaterService struct {
tic80Updater SoftwareUpdaterTIC80ServiceInterface
ebitengineUpdater SoftwareUpdaterEbitengineServiceInterface
loveUpdater SoftwareUpdaterLoveServiceInterface
}
func NewSoftwareUpdaterService(tic80_updater SoftwareUpdaterTIC80ServiceInterface, ebitengine_updater SoftwareUpdaterEbitengineServiceInterface) *SoftwareUpdaterService {
func NewSoftwareUpdaterService(tic80_updater SoftwareUpdaterTIC80ServiceInterface, ebitengine_updater SoftwareUpdaterEbitengineServiceInterface, love_updater SoftwareUpdaterLoveServiceInterface) *SoftwareUpdaterService {
return &SoftwareUpdaterService{
tic80Updater: tic80_updater,
ebitengineUpdater: ebitengine_updater,
loveUpdater: love_updater,
}
}
@@ -27,5 +29,8 @@ func (s *SoftwareUpdaterService) Update(platform, name, version string) error {
if platform == "ebitengine" {
return s.ebitengineUpdater.Update(name, version)
}
if platform == "love" {
return s.loveUpdater.Update(name, version)
}
return fmt.Errorf("unsupported platform: %s", platform)
}