pretty

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2025 License: MIT Imports: 4 Imported by: 1

README

Pretty

Package pretty provides utilities for beautifying console output.

Progress

$ go run cmd/progress/main.go

2025/03/12 09:53:42 pretty: [=========================>                   ]  59%

Table

$ go run cmd/table/main.go

2025/03/12 09:51:57 pretty: City name Area Population Annual Rainfall
2025/03/12 09:51:57 pretty: -----------------------------------------
2025/03/12 09:51:57 pretty:  Adelaide 1295    1158259           600.5
2025/03/12 09:51:57 pretty:  Brisbane 5905    1857594          1146.4
2025/03/12 09:51:57 pretty:    Darwin  112     120900          1714.7
2025/03/12 09:51:57 pretty:    Hobart 1357     205556           619.5
2025/03/12 09:51:57 pretty: Melbourne 1566    3806092           646.9
2025/03/12 09:51:57 pretty:     Perth 5386    1554769           869.4
2025/03/12 09:51:57 pretty:    Sydney 2058    4336374          1214.8

Documentation

Overview

Package pretty provides utilities for beautifying console output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PrintProgress

func PrintProgress(percent float64)

PrintProgress draw a progress bar in the terminal. The percent takes values from 0 to 1.

func PrintTable

func PrintTable(data [][]string)

PrintTable easily draw tables in terminal/console applications from a list of lists of strings.

Types

This section is empty.

Directories

Path Synopsis
cmd
progress command
table command

Jump to

Keyboard shortcuts

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