1
0
mirror of https://github.com/MontFerret/ferret.git synced 2024-12-23 01:24:30 +02:00
ferret/pkg/stdlib/io/fs/util_test.go

21 lines
278 B
Go
Raw Normal View History

2019-10-21 17:26:49 +02:00
package fs_test
import (
"io/ioutil"
"os"
. "github.com/smartystreets/goconvey/convey"
)
func tempFile() (*os.File, func()) {
file, err := ioutil.TempFile("", "fstest")
So(err, ShouldBeNil)
fn := func() {
file.Close()
os.Remove(file.Name())
}
return file, fn
}