printer

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Bold      = "1m"
	Dim       = "2m"
	Italic    = "3m"
	Underline = "4m"

	Black   = "30m"
	Red     = "31m"
	Green   = "32m"
	Yellow  = "33m"
	Blue    = "34m"
	Magenta = "35m"
	Cyan    = "36m"
	White   = "37m"
	Default = "39m"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color int
const (
	ColorAuto Color = iota
	ColorAlways
	ColorNever
)

type Handle

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

func NewHandle

func NewHandle(c Color) *Handle

func (*Handle) Stderr

func (h *Handle) Stderr() *Printer

func (*Handle) Stdout

func (h *Handle) Stdout() *Printer

type Printer

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

func (*Printer) Bytes

func (p *Printer) Bytes() []byte

func (*Printer) Flush

func (p *Printer) Flush(w io.Writer)

func (*Printer) Read

func (p *Printer) Read(b []byte) (int, error)

func (*Printer) Reset

func (p *Printer) Reset()

func (*Printer) Set

func (p *Printer) Set(s Sequence)

func (*Printer) Write

func (p *Printer) Write(b []byte) (int, error)

func (*Printer) WriteRune

func (p *Printer) WriteRune(r rune) (int, error)

func (*Printer) WriteString

func (p *Printer) WriteString(s string) (int, error)

func (*Printer) WriteTo

func (p *Printer) WriteTo(w io.Writer) (int64, error)

type Sequence

type Sequence string

Jump to

Keyboard shortcuts

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