With returns a copy of the Cmd with the args added to the end of Args.
(args ...string)
| 97 | |
| 98 | // With returns a copy of the Cmd with the args added to the end of Args. |
| 99 | func (cmd Cmd) With(args ...string) Cmd { |
| 100 | old := cmd.Args |
| 101 | cmd.Args = make([]string, len(cmd.Args)+len(args)) |
| 102 | copy(cmd.Args, old) |
| 103 | copy(cmd.Args[len(old):], args) |
| 104 | return cmd |
| 105 | } |
| 106 | |
| 107 | // Start executes the command and returns immediately. |
| 108 | func (cmd Cmd) Start(ctx context.Context) (Process, error) { |
no outgoing calls