terminal_wrapper

package module
v0.0.0-...-a3e5094 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2023 License: Apache-2.0 Imports: 4 Imported by: 1

README

Terminal Wrapper

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotTerminal = errors.New("not a terminal")
)

Functions

This section is empty.

Types

type Cursor

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

func (Cursor) GoDown

func (c Cursor) GoDown(lines int)

func (Cursor) GoHome

func (c Cursor) GoHome()

func (Cursor) GoLeft

func (c Cursor) GoLeft(columns int)

func (Cursor) GoRight

func (c Cursor) GoRight(columns int)

func (Cursor) GoUp

func (c Cursor) GoUp(lines int)

func (Cursor) GotoColumn

func (c Cursor) GotoColumn(column int)

func (Cursor) GotoXY

func (c Cursor) GotoXY(line, column int)

func (Cursor) Hide

func (c Cursor) Hide()

func (Cursor) Show

func (c Cursor) Show()

type Terminal

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

func MakeTerminal

func MakeTerminal(f *os.File) (t *Terminal, err error)

func (*Terminal) ClearLine

func (t *Terminal) ClearLine()

func (*Terminal) ClearScreen

func (t *Terminal) ClearScreen()

func (*Terminal) Cursor

func (t *Terminal) Cursor() Cursor

func (*Terminal) EscapePrint

func (t *Terminal) EscapePrint(a ...any)

func (*Terminal) EscapePrintf

func (t *Terminal) EscapePrintf(format string, a ...any)

func (*Terminal) EscapePrintln

func (t *Terminal) EscapePrintln(a ...any)

func (*Terminal) Print

func (t *Terminal) Print(a ...any) (int, error)

func (*Terminal) Printf

func (t *Terminal) Printf(format string, a ...any) (int, error)

func (*Terminal) Println

func (t *Terminal) Println(a ...any) (int, error)

func (*Terminal) ReadPassword

func (t *Terminal) ReadPassword(prompt string) (line string, err error)

func (*Terminal) Restore

func (t *Terminal) Restore() error

func (*Terminal) Write

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

Directories

Path Synopsis
test
cmd

Jump to

Keyboard shortcuts

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