fix: io/ioutil deprecated
parent
9f22f52878
commit
4d5265bba9
|
@ -18,7 +18,6 @@ package constants
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/ioutil"
|
|
||||||
"net"
|
"net"
|
||||||
"os"
|
"os"
|
||||||
"path"
|
"path"
|
||||||
|
@ -564,7 +563,7 @@ func CreateTempDirForKubeadm(kubernetesDir, dirName string) (string, error) {
|
||||||
return "", errors.Wrapf(err, "failed to create directory %q", tempDir)
|
return "", errors.Wrapf(err, "failed to create directory %q", tempDir)
|
||||||
}
|
}
|
||||||
|
|
||||||
tempDir, err := ioutil.TempDir(tempDir, dirName)
|
tempDir, err := os.MkdirTemp(tempDir, dirName)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return "", errors.Wrap(err, "couldn't create a temporary directory")
|
return "", errors.Wrap(err, "couldn't create a temporary directory")
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue