From d0069e73f870c30722050319ccbc888f57c712e2 Mon Sep 17 00:00:00 2001 From: Tyschitskaya Maria Date: Fri, 28 Jan 2022 12:28:24 +0300 Subject: [PATCH] json error text tests fix --- unmarshal_error.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/unmarshal_error.go b/unmarshal_error.go index ddcb816..f782454 100644 --- a/unmarshal_error.go +++ b/unmarshal_error.go @@ -4,6 +4,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" ) var ErrUnmarshal = errors.New("unmarshal error") @@ -30,7 +31,7 @@ func NewUnmarshalError(err error) *UnmarshalError { } func (u *UnmarshalError) WithReader(reader io.Reader) *UnmarshalError { - content, _ := io.ReadAll(reader) + content, _ := ioutil.ReadAll(reader) u.Content = content return u }