internal

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CliCommandRestore

func CliCommandRestore() string

func CliCommandSave

func CliCommandSave() string

func CliCommandStartOfLine

func CliCommandStartOfLine() string

func CliCommandUp

func CliCommandUp(count int) string

func DisableStdinEcho

func DisableStdinEcho() error

func EnableStdinEcho

func EnableStdinEcho() error

func StdinEchoEnabled

func StdinEchoEnabled() bool

Types

type InputLineCounter

type InputLineCounter struct {
	Stream *os.File

	Reader *os.File
	// contains filtered or unexported fields
}

Counts line on input stream Should be created with NewInputLineCounter()

func NewInputLineCounter

func NewInputLineCounter(stream *os.File) *InputLineCounter

func (*InputLineCounter) Count

func (lineCounter *InputLineCounter) Count() int

func (*InputLineCounter) Stop

func (lineCounter *InputLineCounter) Stop()

type LineCounter

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

func NewLineCounter

func NewLineCounter() *LineCounter

func (*LineCounter) Count

func (lineCounter *LineCounter) Count() int

func (*LineCounter) Stop

func (lineCounter *LineCounter) Stop()

type OutputLineCounter

type OutputLineCounter struct {
	Stream *os.File

	Writer *os.File
	// contains filtered or unexported fields
}

func NewOuputLineCounter

func NewOuputLineCounter(stream *os.File) *OutputLineCounter

func (*OutputLineCounter) Count

func (lineCounter *OutputLineCounter) Count() int

func (*OutputLineCounter) Stop

func (lineCounter *OutputLineCounter) Stop()

type Position

type Position struct {
	X int
	Y int
}

func GetCursorPos

func GetCursorPos() (*Position, error)

type TermWatcher

type TermWatcher struct {
	// Channel to recieve width updates
	WidthChan chan int

	// Channel to recieve height updates
	HeightChan chan int

	// Channel to recieve echo toggle updates
	StdinEchoChan chan bool

	// Current terminal Width
	Width int

	// Current terminal Height
	Height int

	// Current terminal stdin echo
	StdinEcho bool
	// contains filtered or unexported fields
}

T

func NewTermWatcher

func NewTermWatcher() *TermWatcher

func (*TermWatcher) Start

func (termOptions *TermWatcher) Start()

func (*TermWatcher) Stop

func (termOptions *TermWatcher) Stop()

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳