Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ClearLine string = "\033[2K"
ClearLine is the ANSI escape code for clearing a terminal line.
View Source
var Cyan (func(string, ...interface{}) string) = color.New(color.FgCyan, color.Bold).SprintfFunc()
Cyan formats a string to display in cyan.
View Source
var Green (func(string, ...interface{}) string) = color.New(color.FgGreen, color.Bold).SprintfFunc()
Green formats a string to display in green.
View Source
var Red (func(string, ...interface{}) string) = color.New(color.FgRed, color.Bold).SprintfFunc()
Red formats a string to display in red.
View Source
var White (func(string, ...interface{}) string) = color.New(color.FgHiWhite, color.Bold).SprintfFunc()
White formats a string to display in high intensity white.
Functions ¶
This section is empty.
Types ¶
type ConsoleWriter ¶
type ConsoleWriter struct { Write func() // contains filtered or unexported fields }
ConsoleWriter asynchronously prints the current state to the console.
func NewConsoleWriter ¶
func NewConsoleWriter() *ConsoleWriter
NewConsoleWriter creates a new ConsoleWriter.
func (*ConsoleWriter) ClearStatus ¶
func (c *ConsoleWriter) ClearStatus()
ClearStatus ensures that the currentStage does not block in quiet mode
func (*ConsoleWriter) Print ¶
func (c *ConsoleWriter) Print(format string, args ...interface{})
Print prints using the color package's colored output writer
func (*ConsoleWriter) Quit ¶
func (c *ConsoleWriter) Quit()
Quit sends a kill signal to this ConsoleWriter.
func (*ConsoleWriter) SetCurrentStage ¶
func (c *ConsoleWriter) SetCurrentStage(currentStage string)
SetCurrentStage sets the current state.
func (*ConsoleWriter) SetStatus ¶
func (c *ConsoleWriter) SetStatus(status *sg.Status)
SetStatus gives the writer the uploader's status, if available.
Click to show internal directories.
Click to hide internal directories.