File: test_util.go

package info (click to toggle)
textql 2.0.3-5
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 1,256 kB
  • sloc: yacc: 962; makefile: 45
file content (13 lines) | stat: -rw-r--r-- 191 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
package test_util

import (
	"io/ioutil"
	"os"
)

func OpenFileFromString(contents string) *os.File {
	f, _ := ioutil.TempFile("./", "csv")
	f.WriteString(contents)
	f.Seek(0, 0)
	return f
}