Skip to content
This repository was archived by the owner on Feb 6, 2026. It is now read-only.
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pkg/event/read.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ package event

import (
"io"
"io/ioutil"
"net/http"
"net/url"
"os"
Expand Down Expand Up @@ -86,7 +85,7 @@ func readFile(pathName string) ([]Event, error) {
}

func readDir(pathName string, recursive bool) ([]Event, error) {
list, err := ioutil.ReadDir(pathName)
list, err := os.ReadDir(pathName)
if err != nil {
return nil, err
}
Expand Down
6 changes: 3 additions & 3 deletions pkg/http/http.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"bytes"
"encoding/json"
"fmt"
"io/ioutil"
"io"
"net/http"
"strings"

Expand Down Expand Up @@ -140,7 +140,7 @@ func structuredRequestToEvent(req *http.Request) (*event.Event, error) {
Mode: event.StructuredMode,
}

body, err := ioutil.ReadAll(req.Body)
body, err := io.ReadAll(req.Body)
if err != nil {
return nil, err
}
Expand Down Expand Up @@ -202,7 +202,7 @@ func structuredRequestToEvent(req *http.Request) (*event.Event, error) {
}

func binaryRequestToEvent(req *http.Request) (*event.Event, error) {
body, err := ioutil.ReadAll(req.Body)
body, err := io.ReadAll(req.Body)
if err != nil {
return nil, err
}
Expand Down
3 changes: 1 addition & 2 deletions pkg/http/http_yaml_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
package http

import (
"io/ioutil"
"log"
"net/http"
"net/http/httptest"
Expand All @@ -29,7 +28,7 @@ Data: |
`

func makeUnitTestYaml() (string, func()) {
file, err := ioutil.TempFile("", "unit_test_*.yaml")
file, err := os.CreateTemp("", "unit_test_*.yaml")
if err != nil {
log.Fatal(err)
}
Expand Down
4 changes: 2 additions & 2 deletions test/diff_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import (
"context"
"errors"
"fmt"
"io/ioutil"
"io"
"log"
"net/http"
"net/url"
Expand Down Expand Up @@ -136,7 +136,7 @@ func curl(target string) ([]byte, error) {
return nil, err
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return nil, err
}
Expand Down
Loading