Documentation ¶
Overview ¶
Package display implements functions for displaying output to users.
Index ¶
- Variables
- func ClearProgress()
- func File() string
- func Handler(entry *log.Entry) error
- func InProgress(message string)
- func JSON(data interface{}) (int, error)
- func SetDebug(debug bool)
- func SetFile(filename string) error
- func SetInteractive(interactive bool)
- func Template(tmpl *template.Template, data interface{}) (string, error)
- func TemplateFile(filename string, data interface{}) (string, error)
- func Test()
Constants ¶
This section is empty.
Variables ¶
View Source
var TestHandler log.Handler
TestHandler collects log entries during testing.
Functions ¶
func Handler ¶
Handler handles log entries. It multiplexes them into two outputs, writing human-readable messages to STDERR and machine-readable entries to a log file.
TODO: does this need to be synchronised?
func InProgress ¶
func InProgress(message string)
InProgress shows a progress spinner with a message.
func SetDebug ¶
func SetDebug(debug bool)
SetDebug turns debug logging to STDERR on or off.
The log file always writes debug-level entries.
func SetInteractive ¶
func SetInteractive(interactive bool)
SetInteractive turns colors and ANSI control characters on or off.
func TemplateFile ¶
TemplateFile renders a template file and its context to string.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.