Help us shape the future of Go! Take the 2026 Go Developer Survey

output

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Sep 12, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Debug

func Debug(w io.Writer, debug bool, err error)

Debug prints internal error details when --debug is set.

Types

type Console

type Console struct {
	Out    io.Writer
	Err    io.Writer
	Color  bool
	Quiet  bool
	Format Format
}

Console wraps stdout/stderr with CI-aware styling.

func NewConsole

func NewConsole(out, err io.Writer, format Format, quiet bool) *Console

NewConsole creates a console respecting NO_COLOR and CI env vars.

func (*Console) PrintJSON added in v0.3.0

func (c *Console) PrintJSON(value any) error

PrintJSON renders a value as formatted JSON.

func (*Console) PrintPlan

func (c *Console) PrintPlan(plan []engine.PlanEntry)

func (*Console) PrintResult

func (c *Console) PrintResult(res report.Result) error

func (*Console) Printf

func (c *Console) Printf(format string, args ...any)

type Format

type Format string

Format selects human or JSON rendering.

const (
	FormatHuman Format = "human"
	FormatJSON  Format = "json"
)

type Spinner added in v0.3.0

type Spinner struct {
	// contains filtered or unexported fields
}

Spinner is a minimal, dependency-free terminal spinner used only in human mode.

func NewSpinner added in v0.3.0

func NewSpinner(out io.Writer) *Spinner

NewSpinner creates a spinner that writes to out.

func (*Spinner) Start added in v0.3.0

func (s *Spinner) Start(msg string)

Start begins the spinner with a message. It is safe to call repeatedly.

func (*Spinner) Stop added in v0.3.0

func (s *Spinner) Stop(final string)

Stop stops the spinner and prints a final line with the provided final message.

Jump to

Keyboard shortcuts

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