render

package
v1.6.5 Latest Latest
Warning

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

Go to latest
Published: May 1, 2026 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsTTY

func IsTTY() bool

Types

type Bus

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

func NewBus

func NewBus(r Renderer) *Bus

func (*Bus) Banner

func (b *Bus) Banner(v string)

func (*Bus) Close

func (b *Bus) Close()

func (*Bus) Flush

func (b *Bus) Flush()

func (*Bus) Header

func (b *Bus) Header(v string)

func (*Bus) Info

func (b *Bus) Info(v string)

func (*Bus) KV

func (b *Bus) KV(k, v string)

func (*Bus) Line

func (b *Bus) Line()

func (*Bus) Progress

func (b *Bus) Progress(label, v string)

func (*Bus) Result

func (b *Bus) Result(v string)

func (*Bus) Send

func (b *Bus) Send(ev Event)

func (*Bus) Warn

func (b *Bus) Warn(v string)

type Event

type Event struct {
	Kind  EventKind
	Label string
	Value string
	Time  time.Time
	// contains filtered or unexported fields
}

type EventKind

type EventKind int
const (
	KindBanner EventKind = iota
	KindHeader
	KindInfo
	KindWarn
	KindResult
	KindKV
	KindLine
	KindProgress
	KindSync
)

type PlainRenderer

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

func NewPlainRenderer

func NewPlainRenderer(w io.Writer) *PlainRenderer

func (*PlainRenderer) Render

func (p *PlainRenderer) Render(ev Event)

type Renderer

type Renderer interface {
	Render(Event)
}

type TTYRenderer

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

func NewTTYRenderer

func NewTTYRenderer(w io.Writer, noColor bool) *TTYRenderer

func (*TTYRenderer) Render

func (t *TTYRenderer) Render(ev Event)

Jump to

Keyboard shortcuts

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