mirror of
				https://github.com/MontFerret/ferret.git
				synced 2025-10-30 23:37:40 +02:00 
			
		
		
		
	io/ioutil has been deprecated since Go 1.16 https://pkg.go.dev/io/ioutil Signed-off-by: ginglis13 <ginglis05@gmail.com>
		
			
				
	
	
		
			20 lines
		
	
	
		
			263 B
		
	
	
	
		
			Go
		
	
	
	
	
	
			
		
		
	
	
			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
 | |
| }
 |