Get The Module | Documentation | Contributing | Code of Conduct
Package cursor contains methods to move the cursor inside a terminal.
# Execute this command inside your project
go get -u github.com/atomicgo/cursor
// Add this to your imports
import "github.com/atomicgo/cursor"
func ClearLine()
func ClearLines(n int)
func ClearScreen()
func CloseAlternativeScreen()
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 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(row int, column int)
Move moves the cursor to a specific row and column.
func NextLine(n int)
func OpenAlternativeScreen()
func PrevLine(n int)
func RestorePosition()
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 Show()
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