multiterm

package
v0.0.0-...-1329d2c Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2026 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AutoTrim = true

Functions

func TermCols

func TermCols() int

func TermRows

func TermRows() int

func WriteLineNoWrap

func WriteLineNoWrap(out io.StringWriter, s string)

Types

type BufferedTerm

type BufferedTerm struct {
	*VirtualTerm
}

func NewBufferedTerm

func NewBufferedTerm() *BufferedTerm

NewBufferedTerm writes on Close

func (*BufferedTerm) Close

func (s *BufferedTerm) Close()

type MultilineTerm

type MultilineTerm interface {
	WriteForLine(line int, s string)
	WriteForLinef(line int, format string, args ...interface{})
	Close()
}

type NullTerm

type NullTerm struct{}

func (*NullTerm) Close

func (s *NullTerm) Close()

func (*NullTerm) WriteForLine

func (s *NullTerm) WriteForLine(line int, l string)

func (*NullTerm) WriteForLinef

func (s *NullTerm) WriteForLinef(line int, format string, args ...interface{})

type TermWriter

type TermWriter struct {
	ClearLine  bool
	HideCursor bool
	// contains filtered or unexported fields
}

func New

func New() *TermWriter

func NewEx

func NewEx(w io.StringWriter) *TermWriter

func (*TermWriter) Close

func (s *TermWriter) Close()

func (*TermWriter) WriteForLine

func (s *TermWriter) WriteForLine(line int, text string)

func (*TermWriter) WriteForLinef

func (s *TermWriter) WriteForLinef(line int, format string, args ...interface{})

type VirtualTerm

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

func NewVirtualTerm

func NewVirtualTerm() *VirtualTerm

func NewVirtualTermEx

func NewVirtualTermEx(size, cap int) *VirtualTerm

func (*VirtualTerm) Close

func (s *VirtualTerm) Close()

Close the virtual term. Doesn't ever really need to close, but useful in testing

func (*VirtualTerm) Get

func (s *VirtualTerm) Get(line int) string

func (*VirtualTerm) IsClosed

func (s *VirtualTerm) IsClosed() bool

IsClosed checks if Close() was called

func (*VirtualTerm) LineCount

func (s *VirtualTerm) LineCount() int

func (*VirtualTerm) WriteForLine

func (s *VirtualTerm) WriteForLine(line int, text string)

func (*VirtualTerm) WriteForLinef

func (s *VirtualTerm) WriteForLinef(line int, format string, args ...interface{})

func (*VirtualTerm) WriteToOutput

func (s *VirtualTerm) WriteToOutput(out io.StringWriter)

WriteToOutput writes to a terminal, preventing any potential wrapping

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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