refactor games utils
This commit is contained in:
parent
5491d667c2
commit
2a62f1f8c7
@ -1,4 +1,4 @@
|
||||
package game
|
||||
package gameUtils
|
||||
|
||||
type SteamGame struct {
|
||||
GameId string
|
@ -1,14 +1,14 @@
|
||||
package game
|
||||
package gameUtils
|
||||
|
||||
// func findGameByID(id string) SteamGame {
|
||||
// for _, game := range GamesList {
|
||||
// if game.GameId == id {
|
||||
// return game
|
||||
// }
|
||||
// }
|
||||
// var temp SteamGame = SteamGame{}
|
||||
// return temp
|
||||
// }
|
||||
func FindGameByID(id string, list Games) SteamGame {
|
||||
for _, game := range list.SteamGames {
|
||||
if game.GameId == id {
|
||||
return game
|
||||
}
|
||||
}
|
||||
var temp SteamGame = SteamGame{}
|
||||
return temp
|
||||
}
|
||||
|
||||
// func findSteamGameByID(id string) SteamGame {
|
||||
// for _, game := range localGames.St {
|
||||
@ -20,8 +20,6 @@ package game
|
||||
// return game
|
||||
// }
|
||||
|
||||
func FindGameByID() {}
|
||||
|
||||
func GetJSGameInterface(game SteamGame) JSGameInterface {
|
||||
newInterface := JSGameInterface{
|
||||
GameID: game.GameId,
|
Loading…
Reference in New Issue
Block a user