chore: remove refs to deprecated io/ioutil (#3811)

Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
guangwu authored and GitHub committed 2023-11-01 16:54:54 -04:00
1 parent 70118882a0
commit 8bb6632512
4 files changed
+7 -10

No files matched your search

+2 -2
View File
@@ -5,7 +5,7 @@ package api
import (
"encoding/json"
"io/ioutil"
"os"
"reflect"
"testing"
@@ -19,7 +19,7 @@ import (
// name
func CloudEventFromFile(t testing.TB, fileName string) *cloudevents.Event {
t.Helper()
b, err := ioutil.ReadFile(fileName)
b, err := os.ReadFile(fileName)
assert.NoError(t, err)
got := &cloudevents.Event{}
err = json.Unmarshal(b, got)