Удалить 'sessionUtils/sessionUtils.go'

This commit is contained in:
cyber-dream 2022-11-11 12:19:05 +00:00
parent ce8d180154
commit e2502298a9

View File

@ -1,54 +0,0 @@
package sessionUtils
import (
"encoding/json"
)
func ConvertServerSessionsToJSON(s Session) []byte {
s_json, err := json.Marshal(s)
_ = err //TODO: Check Errors
return s_json
}
// var FakeSessions = Sessions{
// Sessions: []Session{
// {
// GameId: "garrysmod",
// SessionId: "gmod-test",
// Icon: "",
// Title: "Regular Skirda Gmod server",
// Status: "Super fake session",
// Version: "",
// Expires: time.Time{},
// Arguments: []gameUtils.Argument{
// {
// Body: "+connect",
// Value: "127.0.0.1:27015",
// },
// },
// },
// {
// GameId: "half-lide-1",
// Title: "Half-Life 1 МЯСО",
// Status: "Retro shit",
// Expires: time.Time{},
// },
// {
// GameId: "minecraft",
// Title: "Test 3",
// Status: "Testing session",
// Version: "1.54.7",
// Expires: time.Time{},
// },
// },
// }
func FindSessionByID(sessionId string, sessions []Session) Session {
for _, session := range sessions {
if session.SessionId == sessionId {
return session
}
}
var temp Session = Session{}
return temp
}