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

22 lines
322 B

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}
}