We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 42a61b7 commit 7c8d66fCopy full SHA for 7c8d66f
decoders/json/json.go
@@ -4,7 +4,6 @@ import (
4
"encoding/json"
5
"fmt"
6
"io"
7
- "io/ioutil"
8
"reflect"
9
10
"github.com/vimeo/dials"
@@ -17,13 +16,12 @@ import (
17
16
const JSONTagName = "json"
18
19
// Decoder is a decoder that knows how to work with text encoded in JSON
20
-type Decoder struct {
21
-}
+type Decoder struct{}
22
23
// Decode is a decoder that decodes the JSON from an io.Reader into the
24
// appropriate struct.
25
func (d *Decoder) Decode(r io.Reader, t *dials.Type) (reflect.Value, error) {
26
- jsonBytes, err := ioutil.ReadAll(r)
+ jsonBytes, err := io.ReadAll(r)
27
if err != nil {
28
return reflect.Value{}, fmt.Errorf("error reading JSON: %s", err)
29
}
0 commit comments