test
This commit is contained in:
parent
e2428168ae
commit
1d5a4bcac9
1
main.go
1
main.go
@ -106,6 +106,7 @@ func main() {
|
||||
_, _ = addObjCastle(`🥔`, `Potato`)
|
||||
_, _ = addObjCastle(`🦈`, `Sharkteeth`)
|
||||
_, _ = addObjCastle(`🐺`, `Wolfpack`)
|
||||
_, _ = addObjCastle(`⛔`, `Unknwon`)
|
||||
_, _ = addObjGuild(``, `No Guild`)
|
||||
}
|
||||
|
||||
|
12
obj.go
12
obj.go
@ -240,9 +240,15 @@ func addObjCastle(logo string, name string) (int64, error) {
|
||||
}
|
||||
|
||||
func getObjCastleID(s string) int64 {
|
||||
v, _ := cacheObjCastle.Load(s)
|
||||
c := v.(ChatWarsCastle)
|
||||
return c.ObjID64
|
||||
if v, ok := cacheObjCastle.Load(s); ok {
|
||||
c := v.(ChatWarsCastle)
|
||||
return c.ObjID64
|
||||
} else {
|
||||
v, _ := cacheObjCastle.Load(`⛔`)
|
||||
c := v.(ChatWarsCastle)
|
||||
return c.ObjID64
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
func loadObjCastle() error {
|
||||
|
Loading…
Reference in New Issue
Block a user