color

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: MIT Imports: 9 Imported by: 0

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

Constants

This section is empty.

Variables

This section is empty.

Functions

func NoColor added in v0.1.2

func NoColor()

NoColor prevents colorizing the output.

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.

func (*CodeLineLogger) Skipf

func (l *CodeLineLogger) Skipf(w io.Writer, format string, args ...interface{})

Skipf is used internally in order to provide proper prefix.

Jump to

Keyboard shortcuts

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