1
0
mirror of https://github.com/MontFerret/ferret.git synced 2025-10-30 23:37:40 +02:00
Files
ferret/pkg/stdlib/io/fs/util_test.go
Gavin Inglis 0f3526c178 refactor: remove io/ioutil (#792)
io/ioutil has been deprecated since Go 1.16
https://pkg.go.dev/io/ioutil

Signed-off-by: ginglis13 <ginglis05@gmail.com>
2025-05-07 10:51:10 -04:00

20 lines
263 B
Go

package fs_test
import (
"os"
. "github.com/smartystreets/goconvey/convey"
)
func tempFile() (*os.File, func()) {
file, err := os.CreateTemp("", "fstest")
So(err, ShouldBeNil)
fn := func() {
file.Close()
os.Remove(file.Name())
}
return file, fn
}