()
| 246 | } |
| 247 | |
| 248 | func (c Command) toString() string { |
| 249 | var a []string |
| 250 | if c.Cmd != "" { |
| 251 | a = append(a, c.Cmd) |
| 252 | } |
| 253 | return fmt.Sprint(append(a, c.Args...)) |
| 254 | } |
| 255 | |
| 256 | func (c Command) exec(ctx context.Context) *exec.Cmd { |
| 257 | return exec.CommandContext(ctx, c.Cmd, c.Args...) |