码农笔录博客源码
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

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