godash/message/message.go
2022-10-20 10:31:28 +02:00

34 lines
521 B
Go

package message
type Response struct {
Message string `json:"message" validate:"required"`
}
type (
Responses uint
)
const (
NotFound Responses = iota
CannotOpen
CannotParse
CannotCreate
CannotStart
)
func (e Responses) String() string {
switch e {
case NotFound:
return "cannot be found"
case CannotOpen:
return "cannot be opened"
case CannotParse:
return "cannot be parsed"
case CannotCreate:
return "cannot be created"
case CannotStart:
return "cannot be started"
default:
return ""
}
}