Compare commits

...

3 Commits

Author SHA1 Message Date
bd4d86a2df Merge remote-tracking branch 'origin/main'
# Conflicts:
#	sessionUtils/sessionTypes.go
2022-11-04 03:05:39 +03:00
7465dd9de1 add sessionId field 2022-11-04 03:03:38 +03:00
83ea88a3ab add func find session by id 2022-11-04 03:03:31 +03:00
2 changed files with 11 additions and 0 deletions

View File

@ -7,6 +7,7 @@ import (
) )
type Session struct { type Session struct {
SessionId string
GameId string GameId string
Icon string Icon string
Title string Title string

View File

@ -44,3 +44,13 @@ var FakeSessions = Sessions{
}, },
}, },
} }
func FindSessionByID(sessionId string, sessions []Session) Session {
for _, session := range sessions {
if session.SessionId == sessionId {
return session
}
}
var temp Session = Session{}
return temp
}