Documentation
¶
Overview ¶
Package cout provides verbosity-levelled, coloured console output.
Index ¶
- Constants
- Variables
- func AddResult(pr int, service string, buildNumber int, url string)
- func Errorf(format string, args ...any)
- func FlushJSON()
- func Printf(format string, args ...any)
- func Println(args ...any)
- func Quietf(format string, args ...any)
- func Verbosef(format string, args ...any)
- func Writer() io.Writer
- type BuildResult
Constants ¶
const ( VerbositySilent = iota VerbosityJSON VerbosityQuiet VerbosityNormal VerbosityVerbose )
Verbosity levels (ordered from least to most output)
Variables ¶
var Level = VerbosityNormal
Level controls the output verbosity. Set before any output calls.
Functions ¶
func Errorf ¶ added in v1.0.1
Errorf prints an error to stderr in every mode except silent, so failures stay visible even when stdout is machine-readable (quiet/json) or suppressed.
func FlushJSON ¶
func FlushJSON()
FlushJSON outputs collected results as a JSON array and resets the collector. An empty result set emits [] so JSON mode always produces valid JSON.
func Printf ¶
Printf prints normal output with color support (suppressed in quiet, json, and silent modes)
func Println ¶
func Println(args ...any)
Println prints normal output (suppressed in quiet, json, and silent modes)
func Quietf ¶
Quietf prints output only in quiet mode with color support. Use this for the minimal machine-readable output.