Documentation ¶
Index ¶
- func Blue(text any) string
- func Colorize(text any, atr ...color.Attribute) string
- func Cyan(text any) string
- func GetColorizeFunc(attr ...color.Attribute) func(...any) string
- func Green(text any) string
- func Magenta(text any) string
- func Red(text any) string
- func ToTerminal(args ...any)
- func ToTerminalAndExit(args ...any)
- func ToTerminalAndExitFormatIfError(err error, format string, v ...any)
- func ToTerminalAndExitIfError(err error, args ...any)
- func ToTerminalFormat(format string, v ...any)
- func ToTerminalFormatAndExit(format string, v ...any)
- func ToTerminalFormatIfError(err error, format string, v ...any)
- func ToTerminalIfError(err error, args ...any)
- func ToTerminalRed(args ...any)
- func ToTerminalRedAndExit(args ...any)
- func ToTerminalRedAndExitFormatIfError(err error, format string, v ...any)
- func ToTerminalRedAndExitIfError(err error, args ...any)
- func ToTerminalRedFormat(format string, v ...any)
- func ToTerminalRedFormatAndExit(format string, v ...any)
- func ToTerminalRedFormatIfError(err error, format string, v ...any)
- func ToTerminalRedIfError(err error, args ...any)
- func ToTerminalWithoutNewLine(args ...any)
- func Yellow(text any) string
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Colorize ¶
Custom styles. See: https://github.com/fatih/color
func ToTerminal ¶
func ToTerminal(args ...any)
Print to terminal with new line at the end. Equivalent to fmt.Println.
func ToTerminalAndExit ¶
func ToTerminalAndExit(args ...any)
Print to terminal. Exit with code 0 afterwards.
func ToTerminalAndExitFormatIfError ¶
Print to termianl with format string if error (first argument) is not nil. if v is NOT passed, It'll print the format with err.
like this -> fmt.Printf(format, err)
Exit if error (first argument)
func ToTerminalAndExitIfError ¶
Print to terminal if error (first argument) is not nil. If args (second+ arguments) is NOT passed, It'll print the error (first argument) message.
Exit if error (first argument)
func ToTerminalFormat ¶
Print to terminal with format string. Equivalent to fmt.Printf with \n at the end.
func ToTerminalFormatAndExit ¶
Print to terminal with format string and \n at the end. Exit with code 0 afterwards.
func ToTerminalFormatIfError ¶
Print to termianl with format string if error (first argument) is not nil. if v is NOT passed, It'll print the format with err.
like this -> fmt.Printf(format, err)
func ToTerminalIfError ¶
Print to terminal if error (first argument) is not nil. If args (second+ arguments) is NOT passed, It'll print the error (first argument) message.
func ToTerminalRed ¶
func ToTerminalRed(args ...any)
Print to terminal with red text and new line at the end.
func ToTerminalRedAndExit ¶
func ToTerminalRedAndExit(args ...any)
Print to terminal with red text. Exit with code 0 afterwards.
func ToTerminalRedAndExitFormatIfError ¶
Print to termianl with format string if error (first argument) is not nil. if v is NOT passed, It'll print the format with err.
like this -> fmt.Printf(format, err)
Exit if error (first argument)
func ToTerminalRedAndExitIfError ¶
Print to terminal if error (first argument) is not nil. If args (second+ arguments) is NOT passed, It'll print the error (first argument) message.
Exit if error (first argument)
func ToTerminalRedFormat ¶
Print to terminal with red text formatted string and new line at the end.
func ToTerminalRedFormatAndExit ¶
Print to terminal with red formatted string and \n at the end. Exit with code 0 afterwards.
func ToTerminalRedFormatIfError ¶
Print to terminal with formatted red text if error (first argument) is not nil. If v (second+ arguments) is NOT passed, It'll print the format with err.
like this -> fmt.Printf(format, err)
func ToTerminalRedIfError ¶
Print to terminal with red text if error (first argument) is not nil. If args (second+ arguments) is NOT passed, It'll print the error (first argument) message.
func ToTerminalWithoutNewLine ¶
func ToTerminalWithoutNewLine(args ...any)
Print to terminal without new line at the end. Equivalent to fmt.Print.