diff --git a/command_linux.go b/command_linux.go index 35e6355..59bac90 100644 --- a/command_linux.go +++ b/command_linux.go @@ -16,7 +16,7 @@ func createBaseCommand(c *Command) *exec.Cmd { // Example: // // cred := syscall.Credential{Uid: 1000, Gid: 1000} -// c := NewCommand("echo hello", cred) +// c := NewCommand("echo hello", WithUser(cred)) // c.Execute() func WithUser(credential syscall.Credential) func(c *Command) { return func(c *Command) { diff --git a/command_windows.go b/command_windows.go index 45b8c6f..d6fc650 100644 --- a/command_windows.go +++ b/command_windows.go @@ -16,7 +16,7 @@ func createBaseCommand(c *Command) *exec.Cmd { // Example: // // token := syscall.Token(handle) -// c := NewCommand("echo hello", token) +// c := NewCommand("echo hello", WithUser(token)) // c.Execute() func WithUser(token syscall.Token) func(c *Command) { return func(c *Command) {