Skip to content

Commit 28d4480

Browse files
author
Dean Karn
authored
Merge pull request #32 from c-Brooks/v4
Make Logger interface more flexible
2 parents 7e74550 + d9e847f commit 28d4480

File tree

13 files changed

+33
-32
lines changed

13 files changed

+33
-32
lines changed

.travis.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ before_install:
2121
- mkdir -p $GOPATH/src/gopkg.in
2222
- ln -s $GOPATH/src/github.com/$TRAVIS_REPO_SLUG $GOPATH/src/gopkg.in/webhooks.v2
2323
- ln -s $GOPATH/src/github.com/$TRAVIS_REPO_SLUG $GOPATH/src/gopkg.in/webhooks.v3
24+
- ln -s $GOPATH/src/github.com/$TRAVIS_REPO_SLUG $GOPATH/src/gopkg.in/webhooks.v4
2425

2526
before_script:
2627
- go vet ./...
@@ -35,4 +36,4 @@ script:
3536
after_success: |
3637
[ $TRAVIS_GO_VERSION = 1.10.2 ] &&
3738
overalls -project="github.com/go-playground/webhooks" -covermode=count -ignore=.git,examples -debug &&
38-
goveralls -coverprofile=overalls.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN
39+
goveralls -coverprofile=overalls.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN

README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ Library webhooks
44
[![Build Status](https://travis-ci.org/go-playground/webhooks.svg?branch=v3)](https://travis-ci.org/go-playground/webhooks)
55
[![Coverage Status](https://coveralls.io/repos/go-playground/webhooks/badge.svg?branch=v3&service=github)](https://coveralls.io/github/go-playground/webhooks?branch=v3)
66
[![Go Report Card](https://goreportcard.com/badge/go-playground/webhooks)](https://goreportcard.com/report/go-playground/webhooks)
7-
[![GoDoc](https://godoc.org/gopkg.in/go-playground/webhooks.v3?status.svg)](https://godoc.org/gopkg.in/go-playground/webhooks.v3)
7+
[![GoDoc](https://godoc.org/gopkg.in/go-playground/webhooks.v4?status.svg)](https://godoc.org/gopkg.in/go-playground/webhooks.v4)
88
![License](https://img.shields.io/dub/l/vibe-d.svg)
99

1010
Library webhooks allows for easy receiving and parsing of GitHub, Bitbucket and GitLab Webhook Events
@@ -24,17 +24,17 @@ Installation
2424
Use go get.
2525

2626
```shell
27-
go get -u gopkg.in/go-playground/webhooks.v3
27+
go get -u gopkg.in/go-playground/webhooks.v4
2828
```
2929

3030
Then import the package into your own code.
3131

32-
import "gopkg.in/go-playground/webhooks.v3"
32+
import "gopkg.in/go-playground/webhooks.v4"
3333

3434
Usage and Documentation
3535
------
3636

37-
Please see http://godoc.org/gopkg.in/go-playground/webhooks.v3 for detailed usage docs.
37+
Please see http://godoc.org/gopkg.in/go-playground/webhooks.v4 for detailed usage docs.
3838

3939
##### Examples:
4040

@@ -46,8 +46,8 @@ import (
4646
"fmt"
4747
"strconv"
4848

49-
"gopkg.in/go-playground/webhooks.v3"
50-
"gopkg.in/go-playground/webhooks.v3/github"
49+
"gopkg.in/go-playground/webhooks.v4"
50+
"gopkg.in/go-playground/webhooks.v4/github"
5151
)
5252

5353
const (
@@ -103,8 +103,8 @@ import (
103103
"fmt"
104104
"strconv"
105105

106-
"gopkg.in/go-playground/webhooks.v3"
107-
"gopkg.in/go-playground/webhooks.v3/github"
106+
"gopkg.in/go-playground/webhooks.v4"
107+
"gopkg.in/go-playground/webhooks.v4/github"
108108
)
109109

110110
const (

bitbucket/bitbucket.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"io/ioutil"
77
"net/http"
88

9-
"gopkg.in/go-playground/webhooks.v3"
9+
"gopkg.in/go-playground/webhooks.v4"
1010
)
1111

1212
// Webhook instance contains all methods needed to process events

bitbucket/bitbucket_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"time"
1010

1111
. "gopkg.in/go-playground/assert.v1"
12-
"gopkg.in/go-playground/webhooks.v3"
12+
"gopkg.in/go-playground/webhooks.v4"
1313
)
1414

1515
// NOTES:

examples/custom-logger/main.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ import (
55
"log"
66
"strconv"
77

8-
"gopkg.in/go-playground/webhooks.v3"
9-
"gopkg.in/go-playground/webhooks.v3/github"
8+
"gopkg.in/go-playground/webhooks.v4"
9+
"gopkg.in/go-playground/webhooks.v4/github"
1010
)
1111

1212
const (
@@ -18,15 +18,15 @@ type myLogger struct {
1818
PrintDebugs bool
1919
}
2020

21-
func (l *myLogger) Info(msg string) {
21+
func (l *myLogger) Info(msg ...interface{}) {
2222
log.Println(msg)
2323
}
2424

25-
func (l *myLogger) Error(msg string) {
25+
func (l *myLogger) Error(msg ...interface{}) {
2626
log.Println(msg)
2727
}
2828

29-
func (l *myLogger) Debug(msg string) {
29+
func (l *myLogger) Debug(msg ...interface{}) {
3030
if !l.PrintDebugs {
3131
return
3232
}

examples/multiple-handlers/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"strconv"
66

7-
"gopkg.in/go-playground/webhooks.v3"
8-
"gopkg.in/go-playground/webhooks.v3/github"
7+
"gopkg.in/go-playground/webhooks.v4"
8+
"gopkg.in/go-playground/webhooks.v4/github"
99
)
1010

1111
const (

examples/single-handler/main.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ import (
44
"fmt"
55
"strconv"
66

7-
"gopkg.in/go-playground/webhooks.v3"
8-
"gopkg.in/go-playground/webhooks.v3/github"
7+
"gopkg.in/go-playground/webhooks.v4"
8+
"gopkg.in/go-playground/webhooks.v4/github"
99
)
1010

1111
const (

github/github.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"io/ioutil"
1010
"net/http"
1111

12-
"gopkg.in/go-playground/webhooks.v3"
12+
"gopkg.in/go-playground/webhooks.v4"
1313
)
1414

1515
// Webhook instance contains all methods needed to process events

github/github_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"time"
1010

1111
. "gopkg.in/go-playground/assert.v1"
12-
"gopkg.in/go-playground/webhooks.v3"
12+
"gopkg.in/go-playground/webhooks.v4"
1313
)
1414

1515
// NOTES:

gitlab/gitlab.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
"io/ioutil"
77
"net/http"
88

9-
"gopkg.in/go-playground/webhooks.v3"
9+
"gopkg.in/go-playground/webhooks.v4"
1010
)
1111

1212
// Webhook instance contains all methods needed to process events

0 commit comments

Comments
 (0)