JM-WechatMini/resource/plug_template/router/router.go.tpl
2023-11-02 04:34:46 +08:00

18 lines
336 B
Smarty

package router
import (
"miniapp/plugin/{{ .Snake}}/api"
"github.com/gin-gonic/gin"
)
type {{ .PlugName}}Router struct {
}
func (s *{{ .PlugName}}Router) Init{{ .PlugName}}Router(Router *gin.RouterGroup) {
plugRouter := Router
plugApi := api.ApiGroupApp.{{ .PlugName}}Api
{
plugRouter.POST("routerName", plugApi.ApiName)
}
}