terminal

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2018 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accessor

type Accessor struct {
}

Accessor implement the Terminal interface and fetch the terminal basic information

func (Accessor) CharWidth

func (accessor Accessor) CharWidth() float64

CharWidth get the terminal char width

func (Accessor) IsWindows

func (accessor Accessor) IsWindows() bool

IsWindows check if current system is windows

func (Accessor) ScreenSize

func (accessor Accessor) ScreenSize() (newWidth, newHeight int, err error)

ScreenSize get the terminal screen size

type Terminal

type Terminal interface {
	CharWidth() float64
	ScreenSize() (width, height int, err error)
	IsWindows() bool
}

Terminal get the terminal basic information

func NewTerminalAccessor

func NewTerminalAccessor() Terminal

NewTerminalAccessor create a new terminal accessor

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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