Documentation ¶
Overview ¶
Package output provides functions for displaying information to the end user.
Index ¶
- Constants
- Variables
- func Color(msg string, color int) string
- func ContainerLog(name string, msg string)
- func Duration(msg string) func()
- func Error(err error)
- func ErrorText(msg string)
- func Info(msg string)
- func IsTTY() bool
- func LogDebug(msg string, data interface{})
- func LogError(err error)
- func LogInfo(msg string)
- func LogRotate() error
- func LogWarn(msg string)
- func Progress(msgs []string) func(i int, s ProgressMessageState, cur *int64, total *int64)
- func Warn(msg string)
- func WriteStderr(msg string)
- func WriteStdout(msg string)
- type ProgressMessageState
Constants ¶
View Source
const LogPath = ".platform_cc.log"
LogPath is the path to the log file.
Variables ¶
View Source
var Enable = false
Enable is a flag that enables terminal output.
View Source
var IndentLevel = 0
IndentLevel is the current indentation level.
View Source
var Logging = false
Logging is a flag that enables writting to log file.
View Source
var Verbose = false
Verbose is a flag that enables more verbose output.
Functions ¶
func ContainerLog ¶
ContainerLog prints container log line to stdout.
func LogDebug ¶
func LogDebug(msg string, data interface{})
LogDebug writes debug message to log file.
Types ¶
type ProgressMessageState ¶
type ProgressMessageState int
ProgressMessageState is the state of a progress message.
const ( // ProgressMessageWait is a waiting state. ProgressMessageWait ProgressMessageState = 1 << iota // ProgressMessageDone is a done state. ProgressMessageDone // ProgressMessageSkip is a skipped state. ProgressMessageSkip // ProgressMessageError is an error state. ProgressMessageError // ProgressMessageCancel is a canceled state. ProgressMessageCancel )
func (ProgressMessageState) String ¶
func (p ProgressMessageState) String() string
String returns a string representation of the state.
Click to show internal directories.
Click to hide internal directories.