From f24f4d512e2fae214f8c366d30c88da5dff98096 Mon Sep 17 00:00:00 2001 From: Tyschitskaya Maria Date: Thu, 27 Jan 2022 14:56:47 +0300 Subject: [PATCH] ioutil in unmarshal error --- .github/workflows/ci.yml | 2 +- unmarshal_error.go | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index ccd5d3f..9799a8c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - go-version: ['1.11', '1.12', '1.13', '1.14', '1.15', '1.16', '1.17'] + go-version: ['1.13', '1.14', '1.15', '1.16', '1.17'] steps: - name: Set up Go ${{ matrix.go-version }} uses: actions/setup-go@v2 diff --git a/unmarshal_error.go b/unmarshal_error.go index ca6918d..1163f9c 100644 --- a/unmarshal_error.go +++ b/unmarshal_error.go @@ -5,6 +5,7 @@ import ( "errors" "fmt" "io" + "io/ioutil" ) var ErrUnmarshal = errors.New("unmarshal error") @@ -15,7 +16,7 @@ type UnmarshalError struct { } func (u *UnmarshalError) Error() string { - content, err := io.ReadAll(u.Content) + content, err := ioutil.ReadAll(u.Content) if err != nil { content = []byte("[can not read content]") }