![Daniel Hiltgen](/assets/img/avatar_default.png)
This focuses on Windows first, but coudl be used for Mac and possibly linux in the future.
14 lines
275 B
Go
14 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
|
|
}
|