output

package
v0.0.0-...-827be1f Latest Latest
Warning

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

Go to latest
Published: Dec 15, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExitErr

func ExitErr(txt string, err error)

ExitErr prints out an error and quits

func NoColor

func NoColor(noColor bool)

NoColor disables outputing in color

Types

type BuffOut

type BuffOut struct {
	Out io.Writer
	Err io.Writer
}

BuffOut provides writers to handle output and err output

var Out *BuffOut

Out prints the data to os.Stdout/os.StdErr

func (*BuffOut) PrintBlock

func (bo *BuffOut) PrintBlock(block string)

PrintBlock prints out a block of code with the same background

func (*BuffOut) PrintErr

func (bo *BuffOut) PrintErr(txt string, err error)

PrintErr prints out the text to Stderr

func (*BuffOut) PrintHeader

func (bo *BuffOut) PrintHeader(txt string)

PrintHeader prints out the header

func (*BuffOut) PrintStoplight

func (bo *BuffOut) PrintStoplight(txt string, stopped bool)

PrintStoplight will print out red if stopped is true, green if not

func (*BuffOut) PrintVersion

func (bo *BuffOut) PrintVersion(version string)

PrintVersion will output the current version and colophon

func (*BuffOut) PrintWarning

func (bo *BuffOut) PrintWarning(txt string)

PrintWarning outputs a warning

Jump to

Keyboard shortcuts

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