Documentation ¶
Overview ¶
Package color contains goyek features which additionally have colors.
Set NO_COLOR environment variable to a non-empty string or use the NoColor function to prevent colorizing the output.
Index ¶
- func NoColor()
- func ReportFlow(next goyek.Executor) goyek.Executor
- func ReportStatus(next goyek.Runner) goyek.Runner
- type CodeLineLogger
- func (l *CodeLineLogger) Error(w io.Writer, args ...interface{})
- func (l *CodeLineLogger) Errorf(w io.Writer, format string, args ...interface{})
- func (l *CodeLineLogger) Fatal(w io.Writer, args ...interface{})
- func (l *CodeLineLogger) Fatalf(w io.Writer, format string, args ...interface{})
- func (l *CodeLineLogger) Helper()
- func (l *CodeLineLogger) Log(w io.Writer, args ...interface{})
- func (l *CodeLineLogger) Logf(w io.Writer, format string, args ...interface{})
- func (l *CodeLineLogger) Skip(w io.Writer, args ...interface{})
- func (l *CodeLineLogger) Skipf(w io.Writer, format string, args ...interface{})
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReportFlow ¶ added in v0.2.0
func ReportFlow(next goyek.Executor) goyek.Executor
ReportStatus is a middleware which reports the flow execution status with colors.
The format is based on the reports provided by the Go test runner.
func ReportStatus ¶
func ReportStatus(next goyek.Runner) goyek.Runner
ReportStatus is a middleware which reports the task run status with colors.
The format is based on the reports provided by the Go test runner.
Types ¶
type CodeLineLogger ¶
type CodeLineLogger struct {
// contains filtered or unexported fields
}
CodeLineLogger decorates the log with code line information, identation and colors.
func (*CodeLineLogger) Error ¶
func (l *CodeLineLogger) Error(w io.Writer, args ...interface{})
Error is used internally in order to provide proper prefix.
func (*CodeLineLogger) Errorf ¶
func (l *CodeLineLogger) Errorf(w io.Writer, format string, args ...interface{})
Errorf is used internally in order to provide proper prefix.
func (*CodeLineLogger) Fatal ¶
func (l *CodeLineLogger) Fatal(w io.Writer, args ...interface{})
Fatal is used internally in order to provide proper prefix.
func (*CodeLineLogger) Fatalf ¶
func (l *CodeLineLogger) Fatalf(w io.Writer, format string, args ...interface{})
Fatalf is used internally in order to provide proper prefix.
func (*CodeLineLogger) Helper ¶
func (l *CodeLineLogger) Helper()
Helper marks the calling function as a helper function. When printing file and line information, that function will be skipped. Helper may be called simultaneously from multiple goroutines.
func (*CodeLineLogger) Log ¶
func (l *CodeLineLogger) Log(w io.Writer, args ...interface{})
Log is used internally in order to provide proper prefix.
func (*CodeLineLogger) Logf ¶
func (l *CodeLineLogger) Logf(w io.Writer, format string, args ...interface{})
Logf is used internally in order to provide proper prefix.
func (*CodeLineLogger) Skip ¶
func (l *CodeLineLogger) Skip(w io.Writer, args ...interface{})
Skip is used internally in order to provide proper prefix.