Files
electron-egg/go/controller/user.go
gaoshuaixing 45f72e24df go
2023-11-07 16:45:42 +08:00

32 lines
489 B
Go

package controller
import (
"github.com/gin-gonic/gin"
"ee-go/econtroller"
)
type UserController struct {
econtroller.Controller
}
func (c *UserController) GetName(ctx *gin.Context) {
c.Init(ctx)
c.ReturnJson(0, "success", "hello eego")
}
// func GetName(c *gin.Context) {
// ret := newResult()
// defer c.JSON(http.StatusOK, ret)
// ret.Data = "gsx"
// }
// func GetAge(c *gin.Context) {
// ret := newResult()
// defer c.JSON(http.StatusOK, ret)
// ret.Data = 12
// }