outz

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetColorDefault

func GetColorDefault() *color.Color

GetColorDefault returns a color.

func GetColorError

func GetColorError() *color.Color

GetColorError returns a color.

func GetColorHighlight

func GetColorHighlight() *color.Color

GetColorHighlight returns a color.

func GetColorInfo

func GetColorInfo() *color.Color

GetColorInfo returns a color.

func GetColorSecondary

func GetColorSecondary() *color.Color

GetColorSecondary returns a color.

func GetColorSecondaryHighlight

func GetColorSecondaryHighlight() *color.Color

GetColorSecondaryHighlight returns a color.

func GetColorSuccess

func GetColorSuccess() *color.Color

GetColorSuccess returns a color.

func GetColorWarning

func GetColorWarning() *color.Color

GetColorWarning returns a color.

func MustResetCapturing

func MustResetCapturing()

MustResetCapturing ensures the capturing is stopped (e.g. after a failing test).

func MustStartCapturing

func MustStartCapturing(setupFunc SetupFunc, additionalSetupFuncs ...SetupFunc)

MustStartCapturing sets up the streams and starts capturing.

func MustStopCapturing

func MustStopCapturing() (string, string)

MustStopCapturing restores the original streams and returns the captured stdout/stderr.

Types

type RestoreFunc

type RestoreFunc func()

RestoreFunc describe a function that restores the original streams.

func SetupStandardStreams

func SetupStandardStreams(outW *os.File, errW *os.File) RestoreFunc

SetupStandardStreams is a SetupFunc that configures the stdout/stderr streams.

func SetupTableStreams

func SetupTableStreams(outW *os.File, _ *os.File) RestoreFunc

SetupTableStreams is a SetupFunc that configures the table streams.

type SetupFunc

type SetupFunc func(outW *os.File, errW *os.File) RestoreFunc

SetupFunc describes a function that replaces streams with the ones for capturing.

func GetSetupColorStreams

func GetSetupColorStreams(noColor bool) SetupFunc

GetSetupColorStreams returns a SetupFunc that configures the color streams.

Jump to

Keyboard shortcuts

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