Compare commits

...

4 Commits

Author SHA1 Message Date
0dce90931c comment obsolete session code 2023-02-12 19:58:53 +03:00
cee68d0d61 move skirda session to domain package 2023-02-12 19:58:39 +03:00
d21061e36d add test struct 2023-02-12 19:58:30 +03:00
79886cbfae delete mod file 2023-02-12 19:58:22 +03:00
4 changed files with 19 additions and 21 deletions

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 {

View File

@ -1,4 +1,4 @@
package skirdasession
package domain
import (
"errors"

View File

@ -1,4 +1,4 @@
package minecraftgame
package domain
type JavaVersion struct {
VersionNums `json:"version"`
@ -40,10 +40,10 @@ type AssetIndex struct {
Artifact
}
type Argument struct {
Value string `json:"value"`
Rules []Rule `json:"rules"`
}
// type Argument struct {
// Value string `json:"value"`
// Rules []Rule `json:"rules"`
// }
type Rule struct {
Action RuleAct `json:"action" mapstructure:"action"`
@ -103,3 +103,6 @@ type ModArtifact struct {
Name string
Version string
}
type VersionMeta struct {
}

3
go.mod
View File

@ -1,3 +0,0 @@
module git.gregbrzezinski.com/Skirda/sharedutils
go 1.18