tutils

package module
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2024 License: MIT Imports: 2 Imported by: 1

README

TUtils

TUtils is a simple library with various helpers that can be used in terminal applications

Installation

go get github.com/Perkovec/tutils

Methods

GetSize

Returns the size of the terminal window

package main

import (
    "fmt"
    "github.com/Perkovec/tutils"
)

func main() {
    fmt.Println(tutils.GetSize()) // example: Size{Rows: 24, Columns: 80}
}

Documentation

Overview

Various go helper functions for work with terminal

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Size

type Size struct {
	Rows    int
	Columns int
}

Size is the size of the terminal window

func GetSize

func GetSize() (Size, error)

GetSize returns the size of the terminal window TODO: Add support for other platforms like windows

Jump to

Keyboard shortcuts

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