multi: replace ioutil.WriteFile

This commit is contained in:
erik
2023-06-14 11:33:44 +02:00
committed by ErikEk
parent ab83343c87
commit 789c6bac8c
13 changed files with 20 additions and 31 deletions

View File

@@ -9,7 +9,6 @@ import (
"encoding/binary"
"encoding/hex"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"time"
@@ -235,7 +234,7 @@ func updateLastCompactionDate(dbFile string) error {
byteOrder.PutUint64(tsBytes[:], uint64(time.Now().UnixNano()))
tsFile := fmt.Sprintf("%s%s", dbFile, LastCompactionFileNameSuffix)
return ioutil.WriteFile(tsFile, tsBytes[:], 0600)
return os.WriteFile(tsFile, tsBytes[:], 0600)
}
// GetTestBackend opens (or creates if doesn't exist) a bbolt or etcd