comment obsolete session code

This commit is contained in:
cyber-dream 2023-02-12 19:58:53 +03:00
parent cee68d0d61
commit 0dce90931c

View File

@ -2,19 +2,17 @@ package domain
import (
"errors"
"git.gregbrzezinski.com/Skirda/skirdaGoLauncher/sharedutils/skirdasession"
)
type SkirdaDomain struct {
DomainId string
SkirdaGames
skirdasession.SkirdaSessions
// skirdasession.SkirdaSessions
}
func (domain SkirdaDomain) BuildDomain(newGames []SkirdaGame, newSessions []skirdasession.SkirdaSession) {
func (domain SkirdaDomain) BuildDomain(newGames []SkirdaGame, newSessions []SkirdaSession) {
domain.AddGames(newGames)
domain.AddSessions(newSessions)
// domain.AddSessions(newSessions)
}
type Domains []SkirdaDomain
@ -42,13 +40,13 @@ func (domains Domains) GetGames() SkirdaGames {
return allGames
}
func (domains Domains) GetSessions() skirdasession.SkirdaSessions {
plainSessions := skirdasession.SkirdaSessions{}
for _, domain := range domains {
plainSessions = append(plainSessions, domain.SkirdaSessions...)
}
return plainSessions
}
// func (domains Domains) GetSessions() SkirdaSessions {
// plainSessions := SkirdaSessions{}
// for _, domain := range domains {
// plainSessions = append(plainSessions, SkirdaSessions...)
// }
// return plainSessions
// }
func (domains Domains) FindDomain(domainId string) (SkirdaDomain, error) {
for _, domain := range domains {