Use io.ReadAll

This commit is contained in:
Yoshiyuki Mineo
2025-05-02 01:52:10 +09:00
parent c3a11352a9
commit eccf7b77c8

View File

@@ -3,7 +3,7 @@ package awsutil
import (
"errors"
"io/ioutil"
"io"
"net"
"net/http"
"os/exec"
@@ -19,7 +19,7 @@ func amazonEC2PrivateIPv4() (net.IP, error) {
}
defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body)
body, err := io.ReadAll(res.Body)
if err != nil {
return nil, err
}