123456789101112131415161718192021 |
- package models
- type Error struct {
- Code int
- Message string
- }
- func New(code int, msg string) *Error {
- return &Error{
- Code: code,
- Message: msg,
- }
- }
- func (e *Error) ErrCode() int {
- return e.Code
- }
- func (e *Error) ErrMessage() string {
- return e.Message
- }
|