ui

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UI

type UI struct {
	LogFile        io.Writer
	HostingEnabled bool
	Port           string

	PrettyLog    bool
	DebugEnabled bool
	// contains filtered or unexported fields
}

UI is the way to display stuff on the console.

func (*UI) Debug added in v0.5.3

func (ui *UI) Debug(err string)

Debug logs to the log file only

func (*UI) Debugf added in v0.6.0

func (ui *UI) Debugf(format string, a ...interface{})

Debugf logs to the log file only

func (*UI) Error added in v0.5.1

func (ui *UI) Error(err string)

Error logs errors, these can later be followed up on with a fatal or have potential consequences for the outcome

func (*UI) Errorf added in v0.6.0

func (ui *UI) Errorf(format string, a ...interface{})

Errorf logs errors, these can later be followed up on with a fatal or have potential consequences for the outcome

func (*UI) Fatal added in v0.5.1

func (ui *UI) Fatal(err string)

Fatal should be called when in an unrecoverable state. EG: config file not found, template function not called etc.

func (*UI) Fatalf added in v0.6.0

func (ui *UI) Fatalf(format string, a ...interface{})

Fatalf should be called when in an unrecoverable state. EG: config file not found, template function not called etc.

func (*UI) Info added in v0.5.1

func (ui *UI) Info(err string)

Info logs helpfull information/warnings

func (*UI) Infof added in v0.6.0

func (ui *UI) Infof(format string, a ...interface{})

Infof logs helpfull information/warnings

func (*UI) SetLogfile added in v0.7.0

func (ui *UI) SetLogfile(file io.Writer)

SetLogfile sets the output writer for the logger

func (*UI) SetPrettyPrint added in v0.7.0

func (ui *UI) SetPrettyPrint(enabled bool)

SetPrettyPrint this sets the setting for pretty printing,

func (*UI) ShouldEnableDebug added in v0.13.0

func (ui *UI) ShouldEnableDebug(enabled bool)

ShouldEnableDebug enables/disables debug logging (performance)

func (*UI) ShowResult added in v0.5.1

func (ui *UI) ShowResult()

ShowResult should be shown when something builds successfully

Jump to

Keyboard shortcuts

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