mirror of
https://github.com/sony/sonyflake.git
synced 2026-04-19 07:45:18 +00:00
Use io.ReadAll
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user