screen

package
v2.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: Artistic-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Stdout color supported stdout

Functions

func Clear

func Clear()

Clear clears terminal screen.

func Flush

func Flush() string

Flush buffer and ensure that it will not overflow screen

func Height

func Height() int

Height returns console height

func HideCursor

func HideCursor()

HideCursor hide the cursor

func RestoreState

func RestoreState()

RestoreState restores cursor state.

func SaveState

func SaveState()

SaveState saves cursor state.

func UnHideCursor

func UnHideCursor()

UnHideCursor unhide the cursor

func Width

func Width() int

Width returns console width

Types

type MoveWriter

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

MoveWriter is implemented io.Writer and io.StringWriter.

func NewMoveWriter

func NewMoveWriter(w io.Writer, x, y int) *MoveWriter

NewMoveWriter creates a new MoveWriter.

func (*MoveWriter) Reset

func (m *MoveWriter) Reset()

Reset resets

func (*MoveWriter) SetPosx

func (m *MoveWriter) SetPosx(x int)

SetPosx sets pos x

func (*MoveWriter) Write

func (m *MoveWriter) Write(bs []byte) (nn int, _ error)

Write writes bytes. which is implemented io.Writer.

func (*MoveWriter) WriteString

func (m *MoveWriter) WriteString(s string) (nn int, _ error)

WriteString writes string. which is implemented io.StringWriter.

Jump to

Keyboard shortcuts

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