(out string, err error)
| 239 | } |
| 240 | |
| 241 | func (e *Engine) printCommandOutput(out string, err error) error { |
| 242 | if strings.TrimSpace(out) != "" { |
| 243 | e.println(strings.TrimRight(out, "\n")) |
| 244 | } |
| 245 | if err != nil { |
| 246 | e.printf("❌ Falhou: %v\n", err) |
| 247 | return fmt.Errorf("command failed: %w", err) |
| 248 | } |
| 249 | return nil |
| 250 | } |
| 251 | |
| 252 | // StreamWriter implements io.Writer and calls onOutput per complete line. |
| 253 | // Partial lines are buffered until a newline arrives or Flush() is called. |
no test coverage detected