refactor: race index by name
This commit is contained in:
@@ -16,8 +16,7 @@ const (
|
||||
)
|
||||
|
||||
const (
|
||||
ErrInputUnknownHostRace int = 3000 + iota
|
||||
ErrInputUnknownOpponentRace
|
||||
ErrInputUnknownRace int = 3000 + iota
|
||||
ErrInputEntityTypeNameInvalid
|
||||
ErrInputEntityTypeNameDuplicate
|
||||
ErrInputEntityNotExists
|
||||
@@ -42,10 +41,8 @@ func GenericErrorText(code int) string {
|
||||
return "Storage failure"
|
||||
case ErrGameStateInvalid:
|
||||
return "Invalid game state"
|
||||
case ErrInputUnknownHostRace:
|
||||
return "Host race name is unknown to this game"
|
||||
case ErrInputUnknownOpponentRace:
|
||||
return "Opponent race name is unknown to this game"
|
||||
case ErrInputUnknownRace:
|
||||
return "Race name is unknown to this game"
|
||||
case ErrInputEntityTypeNameInvalid:
|
||||
return "Name has invalid length or symbols"
|
||||
case ErrInputEntityTypeNameDuplicate:
|
||||
|
||||
Reference in New Issue
Block a user