@@ -19,7 +19,6 @@ import (
19
19
"encoding/json"
20
20
"fmt"
21
21
"io"
22
- "io/ioutil"
23
22
"regexp"
24
23
25
24
digest "github.com/opencontainers/go-digest"
@@ -52,7 +51,7 @@ func (e ValidationError) Error() string {
52
51
53
52
// Validate validates the given reader against the schema of the wrapped media type.
54
53
func (v Validator ) Validate (src io.Reader ) error {
55
- buf , err := ioutil .ReadAll (src )
54
+ buf , err := io .ReadAll (src )
56
55
if err != nil {
57
56
return errors .Wrap (err , "unable to read the document file" )
58
57
}
@@ -100,7 +99,7 @@ func (v unimplemented) Validate(src io.Reader) error {
100
99
func validateManifest (r io.Reader ) error {
101
100
header := v1.Manifest {}
102
101
103
- buf , err := ioutil .ReadAll (r )
102
+ buf , err := io .ReadAll (r )
104
103
if err != nil {
105
104
return errors .Wrapf (err , "error reading the io stream" )
106
105
}
@@ -130,7 +129,7 @@ func validateManifest(r io.Reader) error {
130
129
func validateDescriptor (r io.Reader ) error {
131
130
header := v1.Descriptor {}
132
131
133
- buf , err := ioutil .ReadAll (r )
132
+ buf , err := io .ReadAll (r )
134
133
if err != nil {
135
134
return errors .Wrapf (err , "error reading the io stream" )
136
135
}
@@ -152,7 +151,7 @@ func validateDescriptor(r io.Reader) error {
152
151
func validateIndex (r io.Reader ) error {
153
152
header := v1.Index {}
154
153
155
- buf , err := ioutil .ReadAll (r )
154
+ buf , err := io .ReadAll (r )
156
155
if err != nil {
157
156
return errors .Wrapf (err , "error reading the io stream" )
158
157
}
@@ -179,7 +178,7 @@ func validateIndex(r io.Reader) error {
179
178
func validateConfig (r io.Reader ) error {
180
179
header := v1.Image {}
181
180
182
- buf , err := ioutil .ReadAll (r )
181
+ buf , err := io .ReadAll (r )
183
182
if err != nil {
184
183
return errors .Wrapf (err , "error reading the io stream" )
185
184
}
0 commit comments