Shaman: replace deprecated function with its modern replacement
Replace `ioutil.TempDir()` with `os.MkdirTemp()`. No functional changes.
This commit is contained in:
parent
5da5edd333
commit
3b6102fe3a
@ -23,7 +23,6 @@
|
|||||||
package config
|
package config
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
"time"
|
"time"
|
||||||
@ -31,7 +30,7 @@ import (
|
|||||||
|
|
||||||
// CreateTestConfig creates a configuration + cleanup function.
|
// CreateTestConfig creates a configuration + cleanup function.
|
||||||
func CreateTestConfig() (conf Config, cleanup func()) {
|
func CreateTestConfig() (conf Config, cleanup func()) {
|
||||||
tempDir, err := ioutil.TempDir("", "shaman-test-")
|
tempDir, err := os.MkdirTemp("", "shaman-test-")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user