console

package
v0.0.289 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CatOutputTool = idtypes.CatOutputTool
	CatOutputUs   = idtypes.CatOutputUs
)

Variables

View Source
var (
	// Configured globally.
	DebugToConsole = false
	DebugToFile    string
)

Functions

func Cleanup added in v0.0.275

func Cleanup()

func ConsoleOutput

func ConsoleOutput(console writesLines, name string) io.Writer

ConsoleOutput returns a writer, whose output will be managed by the specified ConsoleSink.

func ConsoleOutputName

func ConsoleOutputName(name string) tasks.OutputName

func Debug

func Debug(ctx context.Context) io.Writer

func EnterInputMode

func EnterInputMode(ctx context.Context, params ...string) func()

func Errors

func Errors(ctx context.Context) io.Writer

func GetErrContext

func GetErrContext(ctx context.Context) *actionErrContext

func IsConsoleLike

func IsConsoleLike(ctx context.Context) bool

func MakeConsoleName

func MakeConsoleName(logid string, key string, suffix string) string

func NamedDebug added in v0.0.91

func NamedDebug(ctx context.Context, name string) io.Writer

func Output

func Output(ctx context.Context, name string) io.Writer

func Prepare added in v0.0.275

func Prepare() error

func SetStickyContent

func SetStickyContent(ctx context.Context, name string, content string)

func SetStickyContentOnSink

func SetStickyContentOnSink(sink tasks.ActionSink, name string, content string)

func Stderr

func Stderr(ctx context.Context) io.Writer

func Stdout

func Stdout(ctx context.Context) io.Writer

func TypedOutput

func TypedOutput(ctx context.Context, name string, cat idtypes.CatOutputType) io.Writer

func UnwrapSink

func UnwrapSink(sink tasks.ActionSink) tasks.ActionSink

func Warnings

func Warnings(ctx context.Context) io.Writer

func WithLogs

func WithLogs(ctx context.Context, err error) error

WithLogs adds additional context to the error message, but only if a given message hasn't been output in the most recent log lines.

func WriteJSON

func WriteJSON(w io.Writer, message string, data interface{})

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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