Skip to content
generated from atomicgo/template

🖱️ Go module to move the terminal cursor in any direction on every operating system.

License

Notifications You must be signed in to change notification settings

atomicgo/cursor

Repository files navigation

AtomicGo | cursor

Latest Release Tests Coverage Unit test count Issues License: MIT


Get The Module | Documentation | Contributing | Code of Conduct


AtomicGo

Description

Package cursor contains methods to move the cursor inside a terminal.

Install

# Execute this command inside your project
go get -u github.com/atomicgo/cursor
// Add this to your imports
import "github.com/atomicgo/cursor"

Usage

func ClearLine

func ClearLine()

func ClearLines

func ClearLines(n int)

func ClearScreen

func ClearScreen()

func CloseAlternativeScreen

func CloseAlternativeScreen()

func Down

func Down(n int)

Down moves the cursor n cells down. If the cursor is already at the edge of the screen, this has no effect.

func Hide

func Hide()

func Left

func Left(n int)

Left moves the cursor n cells left. If the cursor is already at the edge of the screen, this has no effect.

func Move

func Move(row int, column int)

Move moves the cursor to a specific row and column.

func NextLine

func NextLine(n int)

func OpenAlternativeScreen

func OpenAlternativeScreen()

func PrevLine

func PrevLine(n int)

func RestorePosition

func RestorePosition()

func Right

func Right(n int)

Right moves the cursor n cells right. If the cursor is already at the edge of the screen, this has no effect.

func SavePosition

func SavePosition()

func Show

func Show()

func Up

func Up(n int)

Up moves the cursor n cells up. If the cursor is already at the edge of the screen, this has no effect.


AtomicGo.dev  ·  with ❤️ by @MarvinJWendt | MarvinJWendt.com