log

package
v0.0.0-...-ccd8cf7 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultValidationRegexPattern = regexp.MustCompile("^.*$")

Functions

func PrintLogo()

func SetupTTY

func SetupTTY(stdin io.Reader, stdout io.Writer) term.TTY

Types

type Logger

type Logger interface {
	Debug(args ...interface{})
	Debugf(format string, args ...interface{})

	Info(args ...interface{})
	Infof(format string, args ...interface{})

	Warn(args ...interface{})
	Warnf(format string, args ...interface{})

	Error(args ...interface{})
	Errorf(format string, args ...interface{})

	Fatal(args ...interface{})
	Fatalf(format string, args ...interface{})

	Panic(args ...interface{})
	Panicf(format string, args ...interface{})

	Done(args ...interface{})
	Donef(format string, args ...interface{})

	Fail(args ...interface{})
	Failf(format string, args ...interface{})

	StartWait(message string)
	StopWait()

	Print(level logrus.Level, args ...interface{})
	Printf(level logrus.Level, format string, args ...interface{})

	Write(message []byte) (int, error)
	WriteString(message string)

	Question(params *QuestionOptions) (string, error)

	SetLevel(level logrus.Level)
	GetLevel() logrus.Level
}

func GetInstance

func GetInstance() Logger

type QuestionOptions

type QuestionOptions struct {
	Question               string
	DefaultValue           string
	ValidationRegexPattern string
	ValidationMessage      string
	ValidationFunc         func(value string) error
	Options                []string
	IsPassword             bool
	IsMultiSelect          bool
}

type Survey

type Survey interface {
	Question(params *QuestionOptions) (string, error)
}

func NewSurvey

func NewSurvey() Survey

Jump to

Keyboard shortcuts

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