say

package
v1.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// FooterPriority is used as priority for footer progressbars
	FooterPriority = 10000
)

Variables

View Source
var (
	// InfoPrefix should be used, when any kind of information is shown to the user, which is not part of the modules result
	InfoPrefix = color.SHiMagenta("[info] ")

	// WarningPrefix should be used, when a warning is displayed to the user
	WarningPrefix = color.SYellow("[warning] ")

	// ErrorPrefix should be used, when the module fails at something, but keeps running.
	// If the error is fatal, use say.Fatal
	ErrorPrefix = color.SHiRed("[error] ")

	// SuccessPrefix should be used, when something succeeded.
	SuccessPrefix = color.SGreen("[success] ")
)

Functions

func Error

func Error(text ...interface{})

Error outputs formatted text to the terminal.

func Fatal added in v1.14.0

func Fatal(text ...interface{})

Fatal outputs formatted text to the terminal.

func Info

func Info(text ...interface{})

Info outputs formatted text to the terminal.

func ProgressBar added in v1.21.0

func ProgressBar(totalSteps int64) *progressbar.Bar

ProgressBar hows a simple progressbar with a set maximum

func ProgressBarFooter added in v1.22.0

func ProgressBarFooter(totalSteps int64) *progressbar.Bar

ProgressBarFooter shows a simple progressbar with a set maximum at the bottom of the terminal

func Success added in v1.21.0

func Success(text ...interface{})

Success outputs formatted text to the terminal.

func Text

func Text(text ...interface{})

Text outputs formatted text to the terminal.

func Warning

func Warning(text ...interface{})

Warning outputs formatted text to the terminal.

Types

This section is empty.

Directories

Path Synopsis
Package color is a modification of https://github.com/fatih/color/blob/master/color.go
Package color is a modification of https://github.com/fatih/color/blob/master/color.go

Jump to

Keyboard shortcuts

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