MCPcopy Create free account
hub / github.com/commander-cli/commander / NewCliOutput

Function NewCliOutput

pkg/output/cli.go:22–35  ·  view source on GitHub ↗

NewCliOutput creates a new OutputWriter with a stdout writer

(color bool)

Source from the content-addressed store, hash-verified

20
21// NewCliOutput creates a new OutputWriter with a stdout writer
22func NewCliOutput(color bool) OutputWriter {
23 au := aurora.NewAurora(color)
24 if run.GOOS == "windows" {
25 au = aurora.NewAurora(false)
26 }
27
28 t := newCliTemplate()
29
30 return OutputWriter{
31 out: os.Stdout,
32 au: au,
33 template: t,
34 }
35}
36
37// TestResult for output
38type TestResult struct {

Callers 6

TestCommandFunction · 0.92
Test_NewCliOutputFunction · 0.85
Test_GetEventHandlerFunction · 0.85
Test_PrintSummaryFunction · 0.85

Calls 1

newCliTemplateFunction · 0.85

Tested by 6

TestCommandFunction · 0.74
Test_NewCliOutputFunction · 0.68
Test_GetEventHandlerFunction · 0.68
Test_PrintSummaryFunction · 0.68