diff options
author | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-09-20 15:11:54 +0300 |
---|---|---|
committer | Patrick Steinhardt <psteinhardt@gitlab.com> | 2021-09-20 17:22:33 +0300 |
commit | af5cd856461519c3f6c1d508eabb40aced2ff384 (patch) | |
tree | 11754fa3b0691a68c3b99c2d302e3a4f6d9536c2 /cmd | |
parent | 4267fbceffbc57def115a294d6ace2c71de76a93 (diff) |
global: Replace deprecated usage of `ioutil.TempFile()`
With Go 1.16, the ioutil package was deprecated. Replace our usage of
`ioutil.TempFile()` with `os.CreateTemp()` to adapt accordingly.
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/gitaly-wrapper/main_test.go | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd/gitaly-wrapper/main_test.go b/cmd/gitaly-wrapper/main_test.go index 50ca5a1bc..8014037bb 100644 --- a/cmd/gitaly-wrapper/main_test.go +++ b/cmd/gitaly-wrapper/main_test.go @@ -2,7 +2,6 @@ package main import ( "errors" - "io/ioutil" "os" "os/exec" "strconv" @@ -19,7 +18,7 @@ func TestStolenPid(t *testing.T) { require.NoError(t, os.Setenv(bootstrap.EnvPidFile, oldValue)) }(os.Getenv(bootstrap.EnvPidFile)) - pidFile, err := ioutil.TempFile("", "pidfile") + pidFile, err := os.CreateTemp("", "pidfile") require.NoError(t, err) defer func() { require.NoError(t, os.Remove(pidFile.Name())) }() |