diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-09-16 15:15:24 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-09-20 17:22:33 +0300 |
commit | d1884b6fae4b65893d3e99be13510648da0b576f (patch) | |
tree | 9159dcbea2c73e6aa3eac44c68e7bef7e5bbcdd9 /cmd | |
parent | 127ca6b9de8d5cca31db5e2345519cf39b0a0e29 (diff) |
global: Replace deprecated usage of `ioutil.ReadFile()`
With Go 1.16, the ioutil package was deprecated. Replace our usage of
`ioutil.ReadFile()` with `os.ReadFile()` to adapt accordingly.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gitaly-blackbox/main.go | 3 | ||||
-rw-r--r-- | cmd/gitaly-wrapper/main.go | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/cmd/gitaly-blackbox/main.go b/cmd/gitaly-blackbox/main.go index cd5cc0647..c0d2481ec 100644 --- a/cmd/gitaly-blackbox/main.go +++ b/cmd/gitaly-blackbox/main.go @@ -3,7 +3,6 @@ package main import ( "flag" "fmt" - "io/ioutil" "os" "github.com/prometheus/client_golang/prometheus" @@ -42,7 +41,7 @@ func main() { } func run(configPath string) error { - configRaw, err := ioutil.ReadFile(configPath) + configRaw, err := os.ReadFile(configPath) if err != nil { return err } diff --git a/cmd/gitaly-wrapper/main.go b/cmd/gitaly-wrapper/main.go index 3ac422070..3fc315b3c 100644 --- a/cmd/gitaly-wrapper/main.go +++ b/cmd/gitaly-wrapper/main.go @@ -2,7 +2,6 @@ package main import ( "fmt" - "io/ioutil" "os" "os/exec" "os/signal" @@ -144,7 +143,7 @@ func forwardSignals(gitaly *os.Process, log *logrus.Entry) { } func getPid() (int, error) { - data, err := ioutil.ReadFile(pidFile()) + data, err := os.ReadFile(pidFile()) if err != nil { return 0, err } |