Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Response ¶
type Response struct {
Message string `json:"message"`
Code int `json:"code"`
Data any `json:"data"`
Writer http.ResponseWriter `json:"-"`
// contains filtered or unexported fields
}
Response HTTP响应封装
func NewResponse ¶
func NewResponse(w http.ResponseWriter) *Response
func (*Response) SetMessage ¶
Click to show internal directories.
Click to hide internal directories.