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

package models
type Error struct {
Status int
Msg string
}
func ReurnError(status int,msg string) *Error {
if msg == "" {
msg = "error"
}
return &Error{Status: status, Msg: msg}
}
type Success struct {
Status int
Msg string
}
func ReurnSuccess(msg string) *Error {
if msg == "" {
msg = "success"
}
return &Error{Status: 0, Msg: msg}
}