message

package
v0.22.2 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var NoProgress bool

NoProgress tracks whether spinner/progress bars show updates

View Source
var SkipLogFile bool

Functions

func Debug

func Debug(payload ...any)

func Debugf

func Debugf(format string, a ...any)

func Error

func Error(err any, message string)

func ErrorWebf added in v0.22.0

func ErrorWebf(err any, w http.ResponseWriter, format string, a ...any)

func Errorf

func Errorf(err any, format string, a ...any)

func Fatal

func Fatal(err any, message string)

func Fatalf

func Fatalf(err any, format string, a ...any)
func GetLogo() string

GetLogo returns the awesome menu ascii logo

func HeaderInfof

func HeaderInfof(format string, a ...any)

func Info

func Info(message string)

func Infof

func Infof(format string, a ...any)

func JsonValue added in v0.20.0

func JsonValue(value any) string

func Note

func Note(text string)

func Notef added in v0.22.0

func Notef(format string, a ...any)

func PrintConnectStringTable added in v0.20.0

func PrintConnectStringTable(connectStrings types.ConnectStrings)

func Question

func Question(text string)

func SetLogLevel

func SetLogLevel(lvl LogLevel)

func SuccessF added in v0.21.2

func SuccessF(format string, a ...any)

func Warn

func Warn(message string)

func Warnf

func Warnf(format string, a ...any)

Types

type Generic added in v0.22.0

type Generic struct{}

func (*Generic) Write added in v0.22.0

func (g *Generic) Write(p []byte) (n int, err error)

type LogLevel

type LogLevel int
const (
	// WarnLevel level. Non-critical entries that deserve eyes.
	WarnLevel LogLevel = iota
	// InfoLevel level. General operational entries about what's going on inside the
	// application.
	InfoLevel
	// DebugLevel level. Usually only enabled when debugging. Very verbose logging.
	DebugLevel
	// TraceLevel level. Designates finer-grained informational events than the Debug.
	TraceLevel
)

func GetLogLevel

func GetLogLevel() LogLevel

type ProgressBar added in v0.20.0

type ProgressBar struct {
	// contains filtered or unexported fields
}

func NewProgressBar added in v0.20.0

func NewProgressBar(total int64, format string, a ...any) *ProgressBar

func (*ProgressBar) Fatalf added in v0.20.0

func (p *ProgressBar) Fatalf(err error, format string, a ...any)

func (*ProgressBar) Stop added in v0.20.0

func (p *ProgressBar) Stop()

func (*ProgressBar) Success added in v0.20.0

func (p *ProgressBar) Success(text string, a ...any)

func (*ProgressBar) Update added in v0.20.0

func (p *ProgressBar) Update(complete int64, text string)

func (*ProgressBar) Write added in v0.20.0

func (p *ProgressBar) Write(data []byte) (int, error)

type Spinner

type Spinner struct {
	// contains filtered or unexported fields
}

func NewProgressSpinner

func NewProgressSpinner(format string, a ...any) *Spinner

func (*Spinner) Debugf

func (p *Spinner) Debugf(format string, a ...any)

func (*Spinner) Errorf

func (p *Spinner) Errorf(err error, format string, a ...any)

func (*Spinner) Fatal added in v0.21.2

func (p *Spinner) Fatal(err error)

func (*Spinner) Fatalf

func (p *Spinner) Fatalf(err error, format string, a ...any)

func (*Spinner) Stop

func (p *Spinner) Stop()

func (*Spinner) Success

func (p *Spinner) Success()

func (*Spinner) Successf

func (p *Spinner) Successf(format string, a ...any)

func (*Spinner) Updatef

func (p *Spinner) Updatef(format string, a ...any)

func (*Spinner) Warnf

func (p *Spinner) Warnf(format string, a ...any)

func (*Spinner) Write

func (p *Spinner) Write(text []byte) (int, error)

Jump to

Keyboard shortcuts

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