码农笔录博客源码
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.
 
 
 
 
 

25 lines
373 B

package models
type Error struct {
Status byte
Msg string
}
func ReurnError(status int,msg string) *Error {
if msg == "" {
msg = "error"
}
return &Error{Status: byte(status), 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}
}