func errRatioToString(r float64) string { failRatioS := fmt.Sprintf("%0.2f", r*100) if r != 0 { return goterm.Color(failRatioS, goterm.RED) } else { return goterm.Color(failRatioS, goterm.GREEN) } }
func (cmd *Command) printOk(message string, params ...interface{}) { fmt.Fprintf(cmd.out, goterm.Color(fmt.Sprintf("OK: %s\n", fmt.Sprintf(message, params...)), goterm.GREEN)+"\n") }
func (cmd *Command) printError(err error) { fmt.Fprint(cmd.out, goterm.Color(fmt.Sprintf("ERROR: %s", err), goterm.RED)+"\n") }