MCPcopy Create free account
hub / github.com/diillson/chatcli / printCommandOutput

Method printCommandOutput

pkg/coder/engine/engine.go:241–250  ·  view source on GitHub ↗
(out string, err error)

Source from the content-addressed store, hash-verified

239}
240
241func (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.

Callers 7

runRipgrepMethod · 0.95
handleTestMethod · 0.95
handleGitStatusMethod · 0.95
handleGitDiffMethod · 0.95
handleGitLogMethod · 0.95
handleGitChangedMethod · 0.95
handleGitBranchMethod · 0.95

Calls 3

printlnMethod · 0.95
printfMethod · 0.95
ErrorfMethod · 0.80

Tested by

no test coverage detected