chore: remove refs to deprecated io/ioutil (#3811)
Signed-off-by: guoguangwu <guoguangwu@magic-shield.com>
This commit is contained in:
1 parent
70118882a0
commit
8bb6632512
4 files changed
+7
-10
No files matched your search
@@ -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)
|
||||
|
||||
Reference in new issue
Block a user