Compare commits

..

No commits in common. "d82b029a06f831c03ee04546aeaab1f2c862e132" and "85679c8b42e1adefbd60a28120580a152d9f6852" have entirely different histories.

5 changed files with 5 additions and 62 deletions

View File

@ -2,7 +2,6 @@ package common
import (
"encoding/json"
"strings"
"mongo.games.com/goserver/core"
)
@ -54,13 +53,6 @@ func (this *CustomConfiguration) GetString(key string) string {
return str
}
}
if v, exist := (*this)[strings.ToLower(key)]; exist {
if str, ok := v.(string); ok {
return str
}
}
return ""
}
@ -75,18 +67,6 @@ func (this *CustomConfiguration) GetStrings(key string) (strs []string) {
return
}
}
if v, exist := (*this)[strings.ToLower(key)]; exist {
if vals, ok := v.([]interface{}); ok {
for _, s := range vals {
if str, ok := s.(string); ok {
strs = append(strs, str)
}
}
return
}
}
return
}
@ -106,23 +86,6 @@ func (this *CustomConfiguration) GetCustomCfgs(key string) (strs []*CustomConfig
return
}
}
if v, exist := (*this)[strings.ToLower(key)]; exist {
if vals, ok := v.([]interface{}); ok {
for _, s := range vals {
if data, ok := s.(map[string]interface{}); ok {
var pkg *CustomConfiguration
modelBuff, _ := json.Marshal(data)
err := json.Unmarshal(modelBuff, &pkg)
if err == nil {
strs = append(strs, pkg)
}
}
}
return
}
}
return
}
@ -137,18 +100,6 @@ func (this *CustomConfiguration) GetInts(key string) (strs []int) {
return
}
}
if v, exist := (*this)[strings.ToLower(key)]; exist {
if vals, ok := v.([]interface{}); ok {
for _, s := range vals {
if str, ok := s.(float64); ok {
strs = append(strs, int(str))
}
}
return
}
}
return
}
func (this *CustomConfiguration) GetInt(key string) int {
@ -157,12 +108,6 @@ func (this *CustomConfiguration) GetInt(key string) int {
return int(val)
}
}
if v, exist := (*this)[strings.ToLower(key)]; exist {
if val, ok := v.(float64); ok {
return int(val)
}
}
return 0
}
@ -172,10 +117,5 @@ func (this *CustomConfiguration) GetBool(key string) bool {
return val
}
}
if v, exist := (*this)[strings.ToLower(key)]; exist {
if val, ok := v.(bool); ok {
return val
}
}
return false
}

View File

@ -1,6 +1,6 @@
package errors
import "mongo.games.com/goserver/core/logger"
import "github.com/idealeak/goserver/core/logger"
var (
begins = []Code{ErrorBegin}

View File

@ -1,6 +1,7 @@
package slots
import (
"github.com/idealeak/goserver/core/logger"
"mongo.games.com/game/gamesrv/base"
"mongo.games.com/game/gamesrv/slotspkg/internal/generic/errors"
"mongo.games.com/game/gamesrv/slotspkg/internal/generic/global"
@ -9,7 +10,6 @@ import (
"mongo.games.com/game/gamesrv/slotspkg/internal/module/shared"
"mongo.games.com/game/gamesrv/slotspkg/slots/machine"
"mongo.games.com/game/gamesrv/slotspkg/slots/types/cli"
"mongo.games.com/goserver/core/logger"
)
func (sm *SlotsMgr) Enter(s *base.SlotsSession, gameId int64) (*cli.SlotsEnterResponse, error) {

1
go.mod
View File

@ -16,6 +16,7 @@ require (
github.com/golang-jwt/jwt/v4 v4.5.1
github.com/google/go-querystring v1.1.0
github.com/howeyc/fsnotify v0.9.0
github.com/idealeak/goserver v0.0.0-20201014040547-b8f686262078
github.com/jinzhu/now v1.1.5
github.com/mohae/deepcopy v0.0.0-20170929034955-c48cc78d4826
github.com/mojocn/base64Captcha v1.3.6

2
go.sum
View File

@ -157,6 +157,8 @@ github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T
github.com/howeyc/fsnotify v0.9.0 h1:0gtV5JmOKH4A8SsFxG2BczSeXWWPvcMT0euZt5gDAxY=
github.com/howeyc/fsnotify v0.9.0/go.mod h1:41HzSPxBGeFRQKEEwgh49TRw/nKBsYZ2cF1OzPjSJsA=
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
github.com/idealeak/goserver v0.0.0-20201014040547-b8f686262078 h1:0Z5Im7EJiMKEiIQPPApdK0uOtyV5Ylo9wA3N9jWrfsU=
github.com/idealeak/goserver v0.0.0-20201014040547-b8f686262078/go.mod h1:ozCWDPw33jhq/GX7nsWS0cFCm5Jyag/Fy0LSQpKXT1I=
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
github.com/innopals/sls-logrus-hook v0.0.0-20190808032145-2fe1d6f7ce00 h1:QfdUfoZWIzBZ/FMtdUE/3wUwzsMU+PGTld17NDBld3k=
github.com/innopals/sls-logrus-hook v0.0.0-20190808032145-2fe1d6f7ce00/go.mod h1:Q24O6QMGImDU3WY71P4YAxNb36NNn5qaznCfMUoXVfc=