Implemented running executables in memory
All checks were successful
/ test (push) Successful in 16s
All checks were successful
/ test (push) Successful in 16s
This commit is contained in:
parent
e5aa006623
commit
a7fd4172b9
10 changed files with 183 additions and 42 deletions
20
src/memfile/New_other.go
Normal file
20
src/memfile/New_other.go
Normal file
|
@ -0,0 +1,20 @@
|
|||
//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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue