mirror of
https://github.com/wonli/aqi.git
synced 2025-12-24 10:40:58 +08:00
WithMsg
This commit is contained in:
@@ -29,6 +29,11 @@ func (r *Response) WithError(e Error, err error) *Response {
|
||||
return r
|
||||
}
|
||||
|
||||
func (r *Response) WithMsg(msg string) *Response {
|
||||
r.Ctx.Msg = msg
|
||||
return r
|
||||
}
|
||||
|
||||
func (r *Response) Send() {
|
||||
r.g.JSON(r.httpCode, r.Ctx)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user