diff --git a/system/os_darwin.go b/system/os_darwin.go new file mode 100644 index 0000000..77fc6c4 --- /dev/null +++ b/system/os_darwin.go @@ -0,0 +1,26 @@ +//go:build darwin + +package system + +import ( + "os/exec" + "syscall" +) + +func WithForeground() Option { + return func(c *exec.Cmd) { + if c.SysProcAttr == nil { + c.SysProcAttr = &syscall.SysProcAttr{ + Foreground: true, + } + } else { + c.SysProcAttr.Foreground = true + } + } +} + +func WithWinHide() Option { + return func(c *exec.Cmd) { + + } +} diff --git a/system/os_linux.go b/system/os_linux.go index ce6bfbe..24c63e6 100644 --- a/system/os_linux.go +++ b/system/os_linux.go @@ -1,3 +1,5 @@ +//go:build linux + package system import ( @@ -16,3 +18,9 @@ func WithForeground() Option { } } } + +func WithWinHide() Option { + return func(c *exec.Cmd) { + + } +} diff --git a/system/os_windows.go b/system/os_windows.go index db38238..6cd3698 100644 --- a/system/os_windows.go +++ b/system/os_windows.go @@ -1,3 +1,5 @@ +//go:build windows + package system import (