msg

package
v3.0.2+incompatible Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2019 License: MIT Imports: 6 Imported by: 48

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DebugEnable bool
View Source
var Default = NewMessenger()

Functions

func Debug

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

func Die

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

func Err

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

func ExitCode

func ExitCode(e int) int

func Info

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

func Msg

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

func Print

func Print(msg string)

func PromptUntil

func PromptUntil(opts []string) (string, error)

func PromptUntilYorN

func PromptUntilYorN() bool

func Puts

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

func Warn

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

Types

type Messenger

type Messenger struct {
	sync.Mutex
	Stdout     io.Writer
	Stderr     io.Writer
	Stdin      io.Reader
	PanicOnDie bool
	// contains filtered or unexported fields
}

func NewMessenger

func NewMessenger() *Messenger

func (*Messenger) Debug

func (m *Messenger) Debug(msg string, args ...interface{})

func (*Messenger) Die

func (m *Messenger) Die(msg string, args ...interface{})

func (*Messenger) Err

func (m *Messenger) Err(msg string, args ...interface{})

func (*Messenger) ExitCode

func (m *Messenger) ExitCode(e int) int

func (*Messenger) HasErrored

func (m *Messenger) HasErrored() bool

func (*Messenger) Info

func (m *Messenger) Info(msg string, args ...interface{})

func (*Messenger) Msg

func (m *Messenger) Msg(msg string, args ...interface{})

func (*Messenger) Print

func (m *Messenger) Print(msg string)

func (*Messenger) PromptUntil

func (m *Messenger) PromptUntil(opts []string) (string, error)

func (*Messenger) PromptUntilYorN

func (m *Messenger) PromptUntilYorN() bool

func (*Messenger) Puts

func (m *Messenger) Puts(msg string, args ...interface{})

func (*Messenger) Warn

func (m *Messenger) Warn(msg string, args ...interface{})

Jump to

Keyboard shortcuts

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