mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-13 13:55:41 +00:00
mount-utils: stop using ioutil
It has been deprecated since Go 1.16. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
parent
b690450e84
commit
699d118d85
@ -24,7 +24,6 @@ import (
|
|||||||
"errors"
|
"errors"
|
||||||
"fmt"
|
"fmt"
|
||||||
"io/fs"
|
"io/fs"
|
||||||
"io/ioutil"
|
|
||||||
"os"
|
"os"
|
||||||
"os/exec"
|
"os/exec"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
@ -270,7 +269,7 @@ func detectSafeNotMountedBehavior() bool {
|
|||||||
// detectSafeNotMountedBehaviorWithExec is for testing with FakeExec.
|
// detectSafeNotMountedBehaviorWithExec is for testing with FakeExec.
|
||||||
func detectSafeNotMountedBehaviorWithExec(exec utilexec.Interface) bool {
|
func detectSafeNotMountedBehaviorWithExec(exec utilexec.Interface) bool {
|
||||||
// create a temp dir and try to umount it
|
// create a temp dir and try to umount it
|
||||||
path, err := ioutil.TempDir("", "kubelet-detect-safe-umount")
|
path, err := os.MkdirTemp("", "kubelet-detect-safe-umount")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
klog.V(4).Infof("Cannot create temp dir to detect safe 'not mounted' behavior: %v", err)
|
klog.V(4).Infof("Cannot create temp dir to detect safe 'not mounted' behavior: %v", err)
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user