Files
kata-containers/src/tools/log-parser/main_test.go
Fabiano Fidêncio 16b8375095 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>
2022-11-17 13:43:25 +01:00

18 lines
328 B
Go

//
// Copyright (c) 2018 Intel Corporation
//
// SPDX-License-Identifier: Apache-2.0
//
package main
import "os"
func createEmptyFile(path string) (err error) {
return os.WriteFile(path, []byte(""), testFileMode)
}
func createFile(file, contents string) error {
return os.WriteFile(file, []byte(contents), testFileMode)
}