This commit is contained in:
Hericium-sys
2026-04-25 13:26:02 +08:00
commit 62b87c6002
29 changed files with 1884 additions and 0 deletions
+26
View File
@@ -0,0 +1,26 @@
package example
import (
"net/http"
"skeleton/utils"
"github.com/gin-gonic/gin"
)
// ExampleController 示例控制器
type ExampleController struct {
service *ExampleService
}
// NewExampleController 创建示例控制器
func NewExampleController() *ExampleController {
return &ExampleController{
service: NewExampleService(),
}
}
// Hello 示例接口
func (c *ExampleController) Hello(ctx *gin.Context) {
ctx.JSON(http.StatusOK, utils.Success(c.service.Hello()))
}