all: Replace deprecated ioutil with io and os

This commit is contained in:
Oleksandr Redko
2023-05-23 17:55:26 +03:00
committed by Bjørn Erik Pedersen
parent 8c7a4e995b
commit 4c46f9400b
3 changed files with 4 additions and 6 deletions

View File

@@ -17,8 +17,8 @@ import (
"bytes"
"encoding/json"
"fmt"
"io"
"io/fs"
"io/ioutil"
"log"
"net/http"
"os"
@@ -203,7 +203,7 @@ var commonTestScriptsParam = testscript.Params{
}
defer resp.Body.Close()
body, err := ioutil.ReadAll(resp.Body)
body, err := io.ReadAll(resp.Body)
if err != nil {
return fmt.Errorf("failed to read response body: %v", err)
}