mirror of
https://github.com/MontFerret/ferret.git
synced 2024-12-23 01:24:30 +02:00
21 lines
278 B
Go
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
|
|
}
|