1st
This commit is contained in:
21
model/errors.go
Executable file
21
model/errors.go
Executable file
@@ -0,0 +1,21 @@
|
||||
package model
|
||||
|
||||
import "gordenko.dev/dima/fixme"
|
||||
|
||||
const (
|
||||
EmptyValue fixme.Code = "100"
|
||||
UnknownZone fixme.Code = "101"
|
||||
UnknownChamp fixme.Code = "102"
|
||||
UnknownTeam fixme.Code = "103"
|
||||
Duplicate fixme.Code = "104"
|
||||
)
|
||||
|
||||
var errorMessages = map[fixme.Code]string{
|
||||
EmptyValue: "Пустое значение недопустимо",
|
||||
UnknownZone: "Неизвестная страна/регион",
|
||||
UnknownChamp: "Неизвестный чемпионат",
|
||||
UnknownTeam: "Неизвестная команда",
|
||||
Duplicate: "Дубликат!",
|
||||
}
|
||||
|
||||
var fix = fixme.New(errorMessages)
|
||||
Reference in New Issue
Block a user