terminal

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2020 License: ISC Imports: 4 Imported by: 1

README

terminal

This package contains a handful of utility functions for interacting with the terminal.

Changelog

See CHANGELOG.md.

License

Copyright © 2019 Aaron Ross, all rights reserved. View the ISC license here.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Terminal added in v0.1.0

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

Terminal represents an initialized terminal interface (its width has been measured)

func New added in v0.1.0

func New() *Terminal

New initializes a terminal (measures its width). This was originally done inside `init`, but this causes issues with some debugging/testing setups and is now done explicitly.

func (*Terminal) ClearLine added in v0.1.0

func (term *Terminal) ClearLine()

ClearLine clears the current line in the terminal.

func (*Terminal) Overwritef added in v0.1.0

func (term *Terminal) Overwritef(format string, s ...interface{})

Overwritef clears the current line in the terminal and then performs a fmt.Printf() with the provided args.

func (*Terminal) Width added in v0.1.0

func (term *Terminal) Width() uint

Width returns the width of the terminal instance.

Jump to

Keyboard shortcuts

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