Say I included binary in my program at compile time, so I keep it in a variable something like var myExec =[]byte{'s','o','m','e',' ','b','y','t','e','s'} So my question is whether there is a way to execute this binary in my program without writing it back to disk and calling exec or fork on it ? I am writing my application in the Golang, so the method I'm looking for is to do this using Go or C (using CGO).
Basically, I'm looking for something like a bash script pipeline in bash, I just donβt know where I can connect the bytes of my own executable to run it and write it to disk, and then allow os to read it again, it seems a lot of extra work to be done
source share