io/ioutil has already been deprecated in golang 1.16, so replace all ioutil with io and os
This commit is contained in:
@@ -17,7 +17,7 @@ limitations under the License.
|
||||
package utils
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
|
||||
"k8s.io/klog/v2"
|
||||
)
|
||||
@@ -26,7 +26,7 @@ func MakeTempDirOrDie(prefix string, baseDir string) string {
|
||||
if baseDir == "" {
|
||||
baseDir = "/tmp"
|
||||
}
|
||||
tempDir, err := ioutil.TempDir(baseDir, prefix)
|
||||
tempDir, err := os.MkdirTemp(baseDir, prefix)
|
||||
if err != nil {
|
||||
klog.Fatalf("Can't make a temp rootdir: %v", err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user