Skip to content

Commit ddbed3c

Browse files
committed
* [chore]: refactor code and remove unused packages
1 parent a8a6471 commit ddbed3c

3 files changed

Lines changed: 0 additions & 10 deletions

File tree

example/example.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,14 @@
77
package main
88

99
import (
10-
"io"
1110
"log"
1211
"net/http"
1312

1413
"github.com/easysoft/gitfox-webhooks/gitfox"
15-
16-
"github.com/davecgh/go-spew/spew"
1714
)
1815

1916
// 接受所有webhook请求,并打印请求内容
2017
func webhookHandler(w http.ResponseWriter, r *http.Request) {
21-
body, _ := io.ReadAll(r.Body)
22-
log.Printf("request body: %s", body)
23-
spew.Dump(r.Header)
2418
hook, _ := gitfox.New()
2519
payload, err := hook.Parse(r,
2620
gitfox.BranchCreatedEvent, gitfox.BranchUpdatedEvent, gitfox.BranchDeletedEvent,

go.mod

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
11
module github.com/easysoft/gitfox-webhooks
22

33
go 1.22.4
4-
5-
require github.com/davecgh/go-spew v1.1.1

go.sum

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +0,0 @@
1-
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
2-
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=

0 commit comments

Comments
 (0)