|
4 | 4 | "context" |
5 | 5 | "encoding/json" |
6 | 6 | "fmt" |
7 | | - "io/ioutil" |
| 7 | + "io" |
8 | 8 | "net/http" |
9 | 9 | "net/http/httptest" |
10 | 10 | "testing" |
@@ -536,7 +536,7 @@ func (ts *webprofileTestServer) ServeHTTP(w http.ResponseWriter, r *http.Request |
536 | 536 | func (ts *webprofileTestServer) create(w http.ResponseWriter, r *http.Request) { |
537 | 537 | var data map[string]interface{} |
538 | 538 |
|
539 | | - body, err := ioutil.ReadAll(r.Body) |
| 539 | + body, err := io.ReadAll(r.Body) |
540 | 540 |
|
541 | 541 | if err != nil { |
542 | 542 | http.Error(w, err.Error(), http.StatusInternalServerError) |
@@ -572,7 +572,7 @@ func (ts *webprofileTestServer) create(w http.ResponseWriter, r *http.Request) { |
572 | 572 | func (ts *webprofileTestServer) createWithoutName(w http.ResponseWriter, r *http.Request) { |
573 | 573 | var data map[string]interface{} |
574 | 574 |
|
575 | | - body, err := ioutil.ReadAll(r.Body) |
| 575 | + body, err := io.ReadAll(r.Body) |
576 | 576 |
|
577 | 577 | if err != nil { |
578 | 578 | http.Error(w, err.Error(), http.StatusInternalServerError) |
@@ -600,7 +600,7 @@ func (ts *webprofileTestServer) createWithoutName(w http.ResponseWriter, r *http |
600 | 600 | func (ts *webprofileTestServer) updatevalid(w http.ResponseWriter, r *http.Request) { |
601 | 601 | var data map[string]interface{} |
602 | 602 |
|
603 | | - body, err := ioutil.ReadAll(r.Body) |
| 603 | + body, err := io.ReadAll(r.Body) |
604 | 604 |
|
605 | 605 | if err != nil { |
606 | 606 | http.Error(w, err.Error(), http.StatusInternalServerError) |
|
0 commit comments