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
2019-10-21 18:26:49 +03:00

21 lines
278 B
Go

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
}