Output executa um comando e retorna sua saída padrão.
(name string, arg ...string)
| 20 | |
| 21 | // Output executa um comando e retorna sua saída padrão. |
| 22 | func (e *OSCommandExecutor) Output(name string, arg ...string) ([]byte, error) { |
| 23 | cmd := exec.Command(name, arg...) //#nosec G204 -- agent/CLI tool execution; commands validated by command_validator + policy_manager upstream |
| 24 | return cmd.Output() |
| 25 | } |
| 26 | |
| 27 | // NewOSCommandExecutor cria um novo executor de comandos do sistema operacional. |
| 28 | func NewOSCommandExecutor() CommandExecutor { |