Use io.ReadAll

This commit is contained in:
Yoshiyuki Mineo committed 2025-05-02 01:52:10 +09:00
1 parent c3a11352a9
commit eccf7b77c8
1 file changed
+2 -2
+2 -2
View File
@@ -3,7 +3,7 @@ package awsutil
import ( import (
"errors" "errors"
"io/ioutil" "io"
"net" "net"
"net/http" "net/http"
"os/exec" "os/exec"
@@ -19,7 +19,7 @@ func amazonEC2PrivateIPv4() (net.IP, error) {
} }
defer res.Body.Close() defer res.Body.Close()
body, err := ioutil.ReadAll(res.Body) body, err := io.ReadAll(res.Body)
if err != nil { if err != nil {
return nil, err return nil, err
} }