From 025528a5d6027d02c2394ac9868768f5a2097d54 Mon Sep 17 00:00:00 2001 From: ian woolf Date: Tue, 8 Mar 2022 21:08:53 +0800 Subject: [PATCH] cmd: use os.MkdirTemp instead of ioutil.TempDir (#10320) Signed-off-by: ianwoolf --- cmd/promtool/tsdb.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/cmd/promtool/tsdb.go b/cmd/promtool/tsdb.go index 2e5d854de..565751f72 100644 --- a/cmd/promtool/tsdb.go +++ b/cmd/promtool/tsdb.go @@ -18,7 +18,6 @@ import ( "context" "fmt" "io" - "io/ioutil" "math" "os" "path/filepath" @@ -70,7 +69,7 @@ func benchmarkWrite(outPath, samplesFile string, numMetrics, numScrapes int) err logger: log.NewLogfmtLogger(log.NewSyncWriter(os.Stderr)), } if b.outPath == "" { - dir, err := ioutil.TempDir("", "tsdb_bench") + dir, err := os.MkdirTemp("", "tsdb_bench") if err != nil { return err }