Documentation ¶
Index ¶
- Constants
- Variables
- func Debugf(format string, args ...interface{})
- func Errorf(format string, args ...interface{})
- func Infof(format string, args ...interface{})
- func Print(m Message)
- func PrintBye()
- func PrintHighlighted(what string)
- func PrintKeyValue(b io.Writer, k string, v interface{})
- func PrintWelcome(version string)
- func Prompt() string
- func RuntimePanic(err error) error
- func Warnf(format string, args ...interface{})
- type ConsoleWriter
- type Message
- type Notification
Constants ¶
View Source
const ( NotifyInfo = iota NotifyWarning NotifyError )
Variables ¶
View Source
var Console = ConsoleWriter{ DeviceIn: os.Stdout, DeviceOut: os.Stdout, StandardOut: os.Stdout, StandardError: os.Stderr, }
View Source
var Panic = RuntimePanic
View Source
var Println = fmt.Println
Println is to inject a function that can report info,error and warning
Functions ¶
func PrintHighlighted ¶ added in v0.9.2
func PrintHighlighted(what string)
func PrintKeyValue ¶ added in v0.9.2
func PrintWelcome ¶ added in v0.9.2
func PrintWelcome(version string)
func RuntimePanic ¶ added in v0.9.2
Types ¶
type ConsoleWriter ¶ added in v0.9.2
type ConsoleWriter struct { DeviceIn io.Writer DeviceOut io.Writer StandardOut io.Writer StandardError io.Writer }
func (ConsoleWriter) Errorf ¶ added in v0.9.2
func (c ConsoleWriter) Errorf(format string, args ...interface{})
func (ConsoleWriter) Warnf ¶ added in v0.9.2
func (c ConsoleWriter) Warnf(format string, args ...interface{})
type Message ¶
func NewWarningf ¶ added in v0.9.2
type Notification ¶
type Notification struct {
// contains filtered or unexported fields
}
func (Notification) Message ¶
func (n Notification) Message() string
func (Notification) Type ¶
func (n Notification) Type() int
Click to show internal directories.
Click to hide internal directories.