1234567891011121314151617181920212223 |
- package apiok
- /*type OkResponse struct {
- Code int `json:"code"`
- Msg string `json:"msg"`
- Data interface{} `json:"data"`
- }
- func CommonResponse(data interface{}) *OkResponse {
- return &OkResponse{
- Code: 200,
- Msg: "ok",
- Data: data,
- }
- }
- */
- type ApiOk struct {
- Success bool `json:"success"`
- }
- func NewApiOk(success bool) *ApiOk {
- return &ApiOk{Success: success}
- }
|