mirror of
https://github.com/sony/sonyflake.git
synced 2026-11-22 08:06:28 +00:00
Use io.ReadAll
This commit is contained in:
1 parent
c3a11352a9
commit
eccf7b77c8
1 file changed
+2
-2
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user