This commit is contained in:
aozhiwei 2023-09-15 15:08:34 +08:00
parent 47db6c9c60
commit 05f5ccedec

View File

@ -26,39 +26,6 @@ func IsDevEnv() bool {
return serverEnv == DEV_ENV
}
/*
func ExtractRegisterTimeFromSessionId(sessionId string) int64 {
tmpStrings := strings.Split(sessionId, "_")
if len(tmpStrings) < 4 {
return 0
}
return new(q5.XValue).SetString(tmpStrings[1]).GetInt64()
}
func ExtractGameIdFromAccountId(accountId string) int32 {
tmpStrings := strings.Split(accountId, "_")
if len(tmpStrings) < 2 {
return 0
}
return new(q5.XValue).SetString(tmpStrings[1]).GetInt32()
}
func ExtractChannelFromAccountId(accountId string) int32 {
tmpStrings := strings.Split(accountId, "_")
if len(tmpStrings) < 2 {
return 0
}
return new(q5.XValue).SetString(tmpStrings[0]).GetInt32()
}
func ExtractOpenIdFromAccountId(accountId string) string {
tmpStrings := strings.Split(accountId, "_")
if len(tmpStrings) < 3 {
return ""
}
return strings.Join(tmpStrings[2:], "_")
}
*/
func New[T any](cb func(*T)) *T {
obj := new(T)
cb(obj)