func (w *OutputWriter) printResult(r TestResult) {
	if !r.Success {
		w.fprintf(w.au.Red(w.template.testResult(r)))
		return
	}
	w.fprintf(w.template.testResult(r))
}
printResult prints the simple output form of a TestReault
package output
import (
	"fmt"
	"io"
	"log"
	"os"
	run "runtime"
	"github.com/commander-cli/commander/v2/pkg/runtime"
	"github.com/logrusorgru/aurora"
)
type OutputWriter struct {
	out      io.Writer
	au       aurora.Aurora
	template cliTemplate
}
func NewCliOutput(color bool) OutputWriter {
	au := aurora.NewAurora(color)
	if run.GOOS == "windows" {
		au = aurora.NewAurora(false)
	}
	t := newCliTemplate()
	return OutputWriter{
		out:      os.Stdout,
		au:       au,
		template: t,
	}
}
type TestResult struct {
	FileName       string
	Title          string
	Node           string
	Tries          int
	Success        bool
	FailedProperty string
	Diff           string
	Error          error
	Skipped        bool
}
func (w *OutputWriter) GetEventHandler() *runtime.EventHandler {
	handler := runtime.EventHandler{}
	handler.TestFinished = func(testResult runtime.TestResult) {
		tr := convertTestResult(testResult)
		w.printResult(tr)
	}
	handler.TestSkipped = func(testResult runtime.TestResult) {
		tr := convertTestResult(testResult)
		w.printSkip(tr)
	}
	return &handler
}
func (w *OutputWriter) PrintSummary(result runtime.Result) bool {
	if result.Failed > 0 {
		w.printFailures(result.TestResults)
	}
	w.fprintf("")
	w.fprintf(w.template.duration(result))
	summary := w.template.summary(result)
	if result.Failed > 0 {
		w.fprintf(w.au.Red(summary))
	} else {
		w.fprintf(w.au.Green(summary))
	}
	return result.Failed == 0
}