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
path: root/cmd
diff options
context:
space:
mode:
authorPatrick Steinhardt <psteinhardt@gitlab.com>2021-09-16 15:15:24 +0300
committerPatrick Steinhardt <psteinhardt@gitlab.com>2021-09-20 17:22:33 +0300
commit4267fbceffbc57def115a294d6ace2c71de76a93 (patch)
tree7bf364b9afd756c51abad07518abfda4fd443e89 /cmd
parentd1884b6fae4b65893d3e99be13510648da0b576f (diff)
global: Replace deprecated usage of `ioutil.TempDir()`
With Go 1.16, the ioutil package was deprecated. Replace our usage of `ioutil.TempDir()` with `os.MkdirTemp()` to adapt accordingly.
Diffstat (limited to 'cmd')
-rw-r--r--cmd/gitaly-git2go/apply.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/cmd/gitaly-git2go/apply.go b/cmd/gitaly-git2go/apply.go
index d3bcfc597..4c6691218 100644
--- a/cmd/gitaly-git2go/apply.go
+++ b/cmd/gitaly-git2go/apply.go
@@ -11,7 +11,6 @@ import (
"flag"
"fmt"
"io"
- "io/ioutil"
"os"
"os/exec"
"path/filepath"
@@ -194,7 +193,7 @@ func (cmd *applySubcommand) threeWayMerge(
}
func (cmd *applySubcommand) buildFakeAncestor(ctx context.Context, repo *git.Repository, diff []byte) (*git.Tree, error) {
- dir, err := ioutil.TempDir("", "gitaly-git2go")
+ dir, err := os.MkdirTemp("", "gitaly-git2go")
if err != nil {
return nil, fmt.Errorf("create temporary directory: %w", err)
}