@@ -19,7 +19,6 @@ import (
1919 "encoding/json"
2020 "fmt"
2121 "io"
22- "io/ioutil"
2322 "regexp"
2423
2524 digest "github.com/opencontainers/go-digest"
@@ -52,7 +51,7 @@ func (e ValidationError) Error() string {
5251
5352// Validate validates the given reader against the schema of the wrapped media type.
5453func (v Validator ) Validate (src io.Reader ) error {
55- buf , err := ioutil .ReadAll (src )
54+ buf , err := io .ReadAll (src )
5655 if err != nil {
5756 return errors .Wrap (err , "unable to read the document file" )
5857 }
@@ -100,7 +99,7 @@ func (v unimplemented) Validate(src io.Reader) error {
10099func validateManifest (r io.Reader ) error {
101100 header := v1.Manifest {}
102101
103- buf , err := ioutil .ReadAll (r )
102+ buf , err := io .ReadAll (r )
104103 if err != nil {
105104 return errors .Wrapf (err , "error reading the io stream" )
106105 }
@@ -130,7 +129,7 @@ func validateManifest(r io.Reader) error {
130129func validateDescriptor (r io.Reader ) error {
131130 header := v1.Descriptor {}
132131
133- buf , err := ioutil .ReadAll (r )
132+ buf , err := io .ReadAll (r )
134133 if err != nil {
135134 return errors .Wrapf (err , "error reading the io stream" )
136135 }
@@ -152,7 +151,7 @@ func validateDescriptor(r io.Reader) error {
152151func validateIndex (r io.Reader ) error {
153152 header := v1.Index {}
154153
155- buf , err := ioutil .ReadAll (r )
154+ buf , err := io .ReadAll (r )
156155 if err != nil {
157156 return errors .Wrapf (err , "error reading the io stream" )
158157 }
@@ -179,7 +178,7 @@ func validateIndex(r io.Reader) error {
179178func validateConfig (r io.Reader ) error {
180179 header := v1.Image {}
181180
182- buf , err := ioutil .ReadAll (r )
181+ buf , err := io .ReadAll (r )
183182 if err != nil {
184183 return errors .Wrapf (err , "error reading the io stream" )
185184 }
0 commit comments