diff --git a/gameUtils/gameUtils.go b/gameUtils/gameUtils.go index b92cda2..d3be5bb 100644 --- a/gameUtils/gameUtils.go +++ b/gameUtils/gameUtils.go @@ -1,5 +1,9 @@ package gameUtils +import ( + "encoding/json" +) + func FindGameByID(id string, list Games) SteamGame { for _, game := range list.SteamGames { if game.GameId == id { @@ -29,3 +33,9 @@ func GetJSGameInterface(game SteamGame) JSGameInterface { } return newInterface } + +func ConvertServerGamesToJSON(g Games) []byte { + g_json, err := json.Marshal(g) + _ = err //TODO: Check Errors + return g_json +}