直接完成

This commit is contained in:
2022-11-23 20:56:28 +08:00
commit b924e94c63
21 changed files with 829 additions and 0 deletions

11
pkg/app/handler_func.go Normal file
View File

@@ -0,0 +1,11 @@
package app
import "github.com/gin-gonic/gin"
func HandlerFunc(handler func(aw *Wrapper) Result) func(c *gin.Context) {
return func(c *gin.Context) {
aw := NewWrapper(c)
res := handler(aw)
c.JSON(200, res)
}
}