cli

package
v1.42.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var GreenText = "\033[32m"
View Source
var RedText = "\033[31m"
View Source
var YellowText = "\033[33m"

Functions

This section is empty.

Types

type CliLoggerOptions

type CliLoggerOptions struct {
	ApplyStylingForOut bool
	ApplyStylingForErr bool
}

type ColorCode

type ColorCode = string

type DotPreloader

type DotPreloader interface {
	Start()
	Stop()
	StopWith(finishMessage string)
}

func NewDotPreloader

func NewDotPreloader(message string, interactiveMode bool) DotPreloader

NewDotPreloader factory to create new DotPreloader - message: message to show before preloader - interactiveMode: if true, preloader will be animated, otherwise it will be static

type StyledCliLogger

type StyledCliLogger interface {
	Infof(format string, a ...any)
	Info(a ...any)
	Errorf(format string, a ...any)
	Error(a ...any)
	Errorc(color ColorCode, a ...any)
	Errorfc(color ColorCode, format string, a ...any)
}

func NewStyledCliLogger

func NewStyledCliLogger(out io.Writer, err io.Writer, options *CliLoggerOptions) StyledCliLogger

type StyledText

type StyledText interface {
	String() string
}

func CGreen added in v1.37.0

func CGreen(a any) StyledText

func CRed added in v1.37.0

func CRed(a any) StyledText

func Colorize

func Colorize(color ColorCode, a any) StyledText

func Colorizef

func Colorizef(color ColorCode, format string, a ...any) StyledText

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL