cmd: use os.MkdirTemp instead of ioutil.TempDir (#10320)

Signed-off-by: ianwoolf <btw515wolf2@gmail.com>
pull/10413/head
ian woolf 2022-03-08 21:08:53 +08:00 committed by GitHub
parent a9e2ffb717
commit 025528a5d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 2 deletions

View File

@ -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
}