mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-19 23:34:23 +01:00
golang: Stop using io/ioutils
The package has been deprecated as part of 1.16 and the same functionality is now provided by either the io or the os package. Signed-off-by: Fabiano Fidêncio <fabiano.fidencio@intel.com>
This commit is contained in:
@@ -6,12 +6,12 @@
|
||||
|
||||
package main
|
||||
|
||||
import "io/ioutil"
|
||||
import "os"
|
||||
|
||||
func createEmptyFile(path string) (err error) {
|
||||
return ioutil.WriteFile(path, []byte(""), testFileMode)
|
||||
return os.WriteFile(path, []byte(""), testFileMode)
|
||||
}
|
||||
|
||||
func createFile(file, contents string) error {
|
||||
return ioutil.WriteFile(file, []byte(contents), testFileMode)
|
||||
return os.WriteFile(file, []byte(contents), testFileMode)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user