@@ -19,7 +19,7 @@ import (
1919 _ "embed"
2020 "errors"
2121 "fmt"
22- "io/ioutil "
22+ "io"
2323 "net/http"
2424 "net/http/httptest"
2525 "net/url"
@@ -246,7 +246,7 @@ func TestOapiRequestValidatorWithOptionsMultiError(t *testing.T) {
246246 {
247247 rec := doGet (t , g , "http://deepmap.ai/multiparamresource?id=50" )
248248 assert .Equal (t , http .StatusBadRequest , rec .Code )
249- body , err := ioutil .ReadAll (rec .Body )
249+ body , err := io .ReadAll (rec .Body )
250250 if assert .NoError (t , err ) {
251251 assert .Contains (t , string (body ), "multiple errors encountered" )
252252 assert .Contains (t , string (body ), "parameter \\ \" id2\\ \" " )
@@ -261,7 +261,7 @@ func TestOapiRequestValidatorWithOptionsMultiError(t *testing.T) {
261261 {
262262 rec := doGet (t , g , "http://deepmap.ai/multiparamresource" )
263263 assert .Equal (t , http .StatusBadRequest , rec .Code )
264- body , err := ioutil .ReadAll (rec .Body )
264+ body , err := io .ReadAll (rec .Body )
265265 if assert .NoError (t , err ) {
266266 assert .Contains (t , string (body ), "multiple errors encountered" )
267267 assert .Contains (t , string (body ), "parameter \\ \" id\\ \" " )
@@ -278,7 +278,7 @@ func TestOapiRequestValidatorWithOptionsMultiError(t *testing.T) {
278278 {
279279 rec := doGet (t , g , "http://deepmap.ai/multiparamresource?id=500" )
280280 assert .Equal (t , http .StatusBadRequest , rec .Code )
281- body , err := ioutil .ReadAll (rec .Body )
281+ body , err := io .ReadAll (rec .Body )
282282 if assert .NoError (t , err ) {
283283 assert .Contains (t , string (body ), "multiple errors encountered" )
284284 assert .Contains (t , string (body ), "parameter \\ \" id\\ \" " )
@@ -295,7 +295,7 @@ func TestOapiRequestValidatorWithOptionsMultiError(t *testing.T) {
295295 {
296296 rec := doGet (t , g , "http://deepmap.ai/multiparamresource?id=abc&id2=1" )
297297 assert .Equal (t , http .StatusBadRequest , rec .Code )
298- body , err := ioutil .ReadAll (rec .Body )
298+ body , err := io .ReadAll (rec .Body )
299299 if assert .NoError (t , err ) {
300300 assert .Contains (t , string (body ), "multiple errors encountered" )
301301 assert .Contains (t , string (body ), "parameter \\ \" id\\ \" " )
@@ -352,7 +352,7 @@ func TestOapiRequestValidatorWithOptionsMultiErrorAndCustomHandler(t *testing.T)
352352 {
353353 rec := doGet (t , g , "http://deepmap.ai/multiparamresource?id=50" )
354354 assert .Equal (t , http .StatusBadRequest , rec .Code )
355- body , err := ioutil .ReadAll (rec .Body )
355+ body , err := io .ReadAll (rec .Body )
356356 if assert .NoError (t , err ) {
357357 assert .Contains (t , string (body ), "Bad stuff" )
358358 assert .Contains (t , string (body ), "parameter \\ \" id2\\ \" " )
@@ -367,7 +367,7 @@ func TestOapiRequestValidatorWithOptionsMultiErrorAndCustomHandler(t *testing.T)
367367 {
368368 rec := doGet (t , g , "http://deepmap.ai/multiparamresource" )
369369 assert .Equal (t , http .StatusBadRequest , rec .Code )
370- body , err := ioutil .ReadAll (rec .Body )
370+ body , err := io .ReadAll (rec .Body )
371371 if assert .NoError (t , err ) {
372372 assert .Contains (t , string (body ), "Bad stuff" )
373373 assert .Contains (t , string (body ), "parameter \\ \" id\\ \" " )
@@ -384,7 +384,7 @@ func TestOapiRequestValidatorWithOptionsMultiErrorAndCustomHandler(t *testing.T)
384384 {
385385 rec := doGet (t , g , "http://deepmap.ai/multiparamresource?id=500" )
386386 assert .Equal (t , http .StatusBadRequest , rec .Code )
387- body , err := ioutil .ReadAll (rec .Body )
387+ body , err := io .ReadAll (rec .Body )
388388 if assert .NoError (t , err ) {
389389 assert .Contains (t , string (body ), "Bad stuff" )
390390 assert .Contains (t , string (body ), "parameter \\ \" id\\ \" " )
@@ -401,7 +401,7 @@ func TestOapiRequestValidatorWithOptionsMultiErrorAndCustomHandler(t *testing.T)
401401 {
402402 rec := doGet (t , g , "http://deepmap.ai/multiparamresource?id=abc&id2=1" )
403403 assert .Equal (t , http .StatusBadRequest , rec .Code )
404- body , err := ioutil .ReadAll (rec .Body )
404+ body , err := io .ReadAll (rec .Body )
405405 if assert .NoError (t , err ) {
406406 assert .Contains (t , string (body ), "Bad stuff" )
407407 assert .Contains (t , string (body ), "parameter \\ \" id\\ \" " )
0 commit comments