Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitaly.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-09-20 15:11:54 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-09-20 17:22:33 +0300
commitaf5cd856461519c3f6c1d508eabb40aced2ff384 (patch)
tree11754fa3b0691a68c3b99c2d302e3a4f6d9536c2 /cmd/gitaly-wrapper
parent4267fbceffbc57def115a294d6ace2c71de76a93 (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/gitaly-wrapper')
-rw-r--r--cmd/gitaly-wrapper/main_test.go3
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())) }()