writer

package
v0.0.0-...-c31eff2 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package writer wraps the terminal, for simple new instance and write as a io.Writer.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Opts

type Opts func(*Terminal)

func WithOnFinish

func WithOnFinish(f func()) Opts

WithOnFinish will set called f when terminal finished f can be called in anther goroutine, must can be thread-safe

type Terminal

type Terminal struct {
	Screen tcell.Screen // the tcell instance
	// contains filtered or unexported fields
}

func New

func New(opts ...Opts) (*Terminal, error)

func (*Terminal) Clear

func (t *Terminal) Clear()

func (*Terminal) Close

func (t *Terminal) Close() error

func (*Terminal) Flush

func (t *Terminal) Flush()

Flush will use buffered content to redraw terminal

func (*Terminal) ForceClearScreen

func (t *Terminal) ForceClearScreen()

func (*Terminal) GetContent

func (t *Terminal) GetContent() []byte

func (*Terminal) Show

func (t *Terminal) Show()

func (*Terminal) Sync

func (t *Terminal) Sync()

func (*Terminal) Write

func (t *Terminal) Write(p []byte) (int, error)

Jump to

Keyboard shortcuts

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