console

package
v0.12.2 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Yes = "y"
	No  = "n"
)
View Source
const PictoBottle = "🍾"
View Source
const PictoCalendar = "📅"
View Source
const PictoCert = "📜"
View Source
const PictoCoffee = "☕"
View Source
const PictoFinish = "🏁"
View Source
const PictoGhost = "👻"
View Source
const PictoHumidity = "💧"
View Source
const PictoKey = "🔑"
View Source
const PictoNotebook = "📒"
View Source
const PictoPin = "📌"
View Source
const PictoPolice = "👮"
View Source
const PictoStop = "🚫"
View Source
const PictoThermometer = "🌡"
View Source
const PictoTicket = "🎟 "
View Source
const PictoTree = "🌲"
View Source
const PictoWoman = "👩"

Variables

View Source
var (
	Yellow = color.New(color.FgYellow).SprintFunc()
	Red    = color.New(color.FgRed).SprintFunc()
	Green  = color.New(color.FgGreen).SprintFunc()
	White  = color.New(color.FgHiWhite).SprintFunc()
	Bold   = color.New(color.Bold).SprintFunc()
)

Available ANSI colors

View Source
var Trace bool

Functions

func Debug

func Debug(msg string)

func Debugf

func Debugf(msg string, args ...interface{})

func Error

func Error(msg string)

func Errorf

func Errorf(msg string, args ...interface{})

func Exit

func Exit(code int, msg string, args ...interface{}) cli.ExitCoder

func Format

func Format(err error) string

func Info

func Info(msg string)

func Infof

func Infof(msg string, args ...interface{})

func IsVerbose

func IsVerbose(ctx context.Context) bool

func PInfof

func PInfof(picto, msg string, args ...interface{})

func Print

func Print(msg string)

func Printf

func Printf(msg string, args ...interface{})

func Prompt

func Prompt(question string, constraints ...string) (string, error)

func SetOutput

func SetOutput(w, errw io.Writer)

func SetVerbose

func SetVerbose(parent context.Context, value bool) context.Context

func Warn

func Warn(msg string)

func Warnf

func Warnf(msg string, args ...interface{})

func YesOrNo

func YesOrNo(question string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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