You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
23 rivejä
322 B
23 rivejä
322 B
6 vuotta sitten
|
package models
|
||
|
|
||
|
type Error struct {
|
||
|
Status byte
|
||
|
Msg string
|
||
|
}
|
||
|
|
||
|
func ReurnError(msg string) *Error {
|
||
|
return &Error{Status: byte(1), Msg: msg}
|
||
|
}
|
||
|
|
||
|
type Success struct {
|
||
|
Status byte
|
||
|
Msg string
|
||
|
}
|
||
|
|
||
|
func ReurnSuccess(msg string) *Error {
|
||
|
if msg == "" {
|
||
|
msg = "success"
|
||
|
}
|
||
|
return &Error{Status: byte(0), Msg: msg}
|
||
|
}
|