func colorizeLevel(level string) string {
	var (
		red         string = "\033[0;31m"
		green       string = "\033[0;32m"
		yellow      string = "\033[1;33m"
		noColor     string = "\033[0m"
		color, icon string
	)
	switch level {
	case "success":
		color = green
		icon = "[OK]"
	case "error":
		color = red
		icon = "[ERROR]"
	case "info":
		color = yellow
		icon = "[INFO]"
	default:
		color = noColor
	}
	return fmt.Sprintf("%s%s%s", color, icon, noColor)
}
colorizeLevel function for send (colored or common) message to output.
package cgapp
import (
	"fmt"
	"time"
	"github.com/mattn/go-colorable"
)
var (
	Stdout = colorable.NewColorableStdout()  
	Stderr = colorable.NewColorableStderr()  
)
func ShowMessage(level, text string, startWithNewLine, endWithNewLine bool) {
	var startLine, endLine string
	if startWithNewLine {
		startLine = "\n"  
	}
	if endWithNewLine {
		endLine = "\n"  
	}
	message := fmt.Sprintf("%s %s %s %s", startLine, colorizeLevel(level), text, endLine)
	fmt.Fprintln(Stdout, message)
}
func ShowError(text string) error {
	return fmt.Errorf("%s%s", colorizeLevel("error"), text)
}
func CalculateDurationTime(startTimer time.Time) string {
	return fmt.Sprintf("%.0f", time.Since(startTimer).Seconds())
}