Skip to content

Commit 00e2e9c

Browse files
committed
Fix webhook test to avoid deprecated ioutil for staticcheck
1 parent 9d8e9cc commit 00e2e9c

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

integrations/webhook/webhook_test.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package webhook
22

33
import (
4-
"io/ioutil"
4+
"io"
55
"net/http"
66
"net/http/httptest"
77
"sync/atomic"
@@ -14,7 +14,7 @@ func TestSink_OnEventPostsToEndpoints(t *testing.T) {
1414
var hits int32
1515
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
1616
atomic.AddInt32(&hits, 1)
17-
_, _ = ioutil.ReadAll(r.Body)
17+
_, _ = io.ReadAll(r.Body)
1818
_ = r.Body.Close()
1919
}))
2020
defer srv.Close()
@@ -26,4 +26,3 @@ func TestSink_OnEventPostsToEndpoints(t *testing.T) {
2626
t.Fatalf("expected 1 hit, got %d", hits)
2727
}
2828
}
29-

0 commit comments

Comments
 (0)