Merge pull request #16603 from testwill/master

chore: io/ioutil deprecated
pull/16623/head
Steven Powell 2023-06-02 10:56:55 -07:00 committed by GitHub
commit 5098298eed
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 @@ package constants
import (
"fmt"
"io/ioutil"
"net"
"os"
"path"
@ -564,7 +563,7 @@ func CreateTempDirForKubeadm(kubernetesDir, dirName string) (string, error) {
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 {
return "", errors.Wrap(err, "couldn't create a temporary directory")
}