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