1
0
mirror of synced 2024-11-21 20:36:06 +03:00

ioutil in unmarshal error

This commit is contained in:
Tyschitskaya Maria 2022-01-27 14:56:47 +03:00
parent cd6859b074
commit f24f4d512e
2 changed files with 3 additions and 2 deletions

View File

@ -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

View File

@ -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]")
}