Files
teletypegames/domain/service.software_updater.go
T
2025-12-07 11:32:45 +01:00

23 lines
483 B
Go

package domain
import (
"fmt"
)
// Keep os for getting GAME_PATH in TIC80 service if needed
type SoftwareUpdaterService interface {
UpdateSoftware(platform, name string) error
}
type softwareUpdaterService struct {
tic80Updater SoftwareUpdaterTIC80Service
}
func (s *softwareUpdaterService) UpdateSoftware(platform, name string) error {
if platform == "tic80" {
return s.tic80Updater.UpdateTIC80Software(name)
}
return fmt.Errorf("unsupported platform: %s", platform)
}