ioutil in unmarshal error
This commit is contained in:
parent
cd6859b074
commit
f24f4d512e
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
@ -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]")
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user