29e90cc13b
This focuses on Windows first, but coudl be used for Mac and possibly linux in the future.
13 lines
275 B
Go
13 lines
275 B
Go
package lifecycle
|
|
|
|
import (
|
|
"context"
|
|
"os/exec"
|
|
"syscall"
|
|
)
|
|
|
|
func getCmd(ctx context.Context, exePath string) *exec.Cmd {
|
|
cmd := exec.CommandContext(ctx, exePath, "serve")
|
|
cmd.SysProcAttr = &syscall.SysProcAttr{HideWindow: true, CreationFlags: 0x08000000}
|
|
return cmd
|
|
}
|