q/src/memfile/New_other.go
Eduard Urbach b55b582b69
All checks were successful
/ test (push) Successful in 22s
Simplified in-memory execution
2025-07-07 15:13:13 +02:00

20 lines
No EOL
285 B
Go

//go:build !linux
package memfile
import (
"os"
"git.urbach.dev/cli/q/src/global"
)
// New creates a new anonymous in-memory file.
func New(name string) (*os.File, error) {
pattern := "*"
if global.OS == "windows" {
pattern = "*.exe"
}
return os.CreateTemp("", pattern)
}