git-hook/git_hook.go
2021-11-12 11:43:40 +08:00

27 lines
577 B
Go

// Package git_hook...
//
// Description : git_hook...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2021-10-13 11:11 上午
package main
import (
"git.zhangdeman.cn/zhangdeman/gopkg/git_hook"
"github.com/gin-gonic/gin"
)
func main() {
router := gin.Default()
// 注册回调路由
_ = git_hook.RegisterGitHookRouter(router, func(ctx *gin.Context, hookData *git_hook.HookData) *git_hook.ResponseData {
return &git_hook.ResponseData{
Code: 0,
Message: "成功接收到web hook通知",
Data: hookData,
}
})
_ = router.Run(":12590")
}