output

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2026 License: AGPL-3.0, AGPL-3.0-only Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Banner(title string)

Banner prints a prominent section header.

func Bullet

func Bullet(indent int, format string, args ...any)

Bullet prints a bulleted item with optional indentation.

func Complete

func Complete(msg string)

Complete prints a completion message.

func Enabled

func Enabled() bool

Enabled returns whether legacy output is currently active.

func Fail

func Fail(format string, args ...any)

Fail prints a failure message to stdout.

func Field

func Field(label, value string)

Field prints a labeled value.

func FormatBytes

func FormatBytes(b int64) string

FormatBytes returns a human-readable byte size.

func Header(engine, mode, clusterName, namespace string)

Header prints a formatted header line for HASteward startup.

func Info

func Info(format string, args ...any)

Info prints an informational line prefixed with >> (recommendation style).

func Printf

func Printf(format string, args ...any)

Printf is a mode-aware wrapper around fmt.Fprintf to the package writer. In json/jsonl modes this is a no-op.

func Println

func Println(args ...any)

Println is a mode-aware wrapper around fmt.Fprintln to the package writer. In json/jsonl modes this is a no-op.

func Section

func Section(title string)

Section prints a subsection divider.

func SetEnabled

func SetEnabled(v bool)

SetEnabled controls whether output functions produce any output. Call SetEnabled(false) in json/jsonl modes to silence legacy output.

func SetWriter

func SetWriter(w io.Writer)

SetWriter sets the package-level writer for all output functions.

func Stderr

func Stderr(format string, args ...any)

Stderr writes to stderr unconditionally, regardless of output mode. Used for CLI messages that must not mix with stdout data (errors, status).

func Success

func Success(format string, args ...any)

Success prints a success message.

func SuggestedCommands

func SuggestedCommands(engine, clusterName, namespace string)

SuggestedCommands prints suggested repair commands for triage output.

func Warn

func Warn(format string, args ...any)

Warn prints a warning message to stdout.

func Writer

func Writer() io.Writer

Writer returns the current writer (os.Stdout or io.Discard).

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