mirror of
https://github.com/opentffoundation/opentf.git
synced 2025-12-25 01:00:16 -05:00
internal/registry: deprecate io/ioutil (#349)
Signed-off-by: jay-dee7 <me@jsdp.dev>
This commit is contained in:
@@ -7,7 +7,7 @@ import (
|
||||
"context"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io/ioutil"
|
||||
"io"
|
||||
"log"
|
||||
"net/http"
|
||||
"net/url"
|
||||
@@ -228,7 +228,7 @@ func (c *Client) ModuleLocation(ctx context.Context, module *regsrc.Module, vers
|
||||
defer resp.Body.Close()
|
||||
|
||||
// there should be no body, but save it for logging
|
||||
body, err := ioutil.ReadAll(resp.Body)
|
||||
body, err := io.ReadAll(resp.Body)
|
||||
if err != nil {
|
||||
return "", fmt.Errorf("error reading response body from registry: %s", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user