Skip to content

Commit 6e74871

Browse files
committed
remove unused variable "events".
1 parent 4b51b0a commit 6e74871

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

linebot/webhook.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ import (
2424
)
2525

2626
// ParseRequest method
27-
func (client *Client) ParseRequest(r *http.Request) (events []Event, err error) {
27+
func (client *Client) ParseRequest(r *http.Request) ([]Event, error) {
2828
defer r.Body.Close()
2929
body, err := ioutil.ReadAll(r.Body)
3030
if err != nil {
31-
return
31+
return nil, err
3232
}
3333
if !client.validateSignature(r.Header.Get("X-LINE-Signature"), body) {
3434
return nil, ErrInvalidSignature

0 commit comments

Comments
 (0)