统一初始beego mvc 的方法
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.

18 lines
295 B

  1. package response
  2. type Json struct {
  3. Code int `json:"code"`
  4. Data interface{} `json:"data"`
  5. Msg string `json:"msg"`
  6. Status bool `json:"status"`
  7. }
  8. func GetDefaultJsonResponse() *Json {
  9. return &Json{
  10. Code: 0,
  11. Data: nil,
  12. Msg: "ok",
  13. Status: true,
  14. }
  15. }