# README
go-utils
A collection of GO libraries
Warning: unstable API, WIP
NOTICE: The rtag utility from this repo is relocated to http://github.com/adnsv/rtag
Libraries
library | description |
---|---|
ansi | utilities to support virtual terminal output |
binpack | binary resource packer |
download | download helpers |
filesystem | file system helpers |
git | git stats |
gopackage | a little helper to construct go build ... commands |
markout | a set of tiny pretty writers targeting markdown, html, and plain text output with the same API |
osarch | utilities to help with OS/ARCH pairs when building cross-platform targets |
pack | archiving |
prompt | utilities for building interactive cli applications |
sourcecode | tracking row:column locations within source code |
unpack | unarchiving |
version | version number utilities |
Documentation
Automatically generated documentation for the included packages can be viewed online here: http://pkg.go.dev/github.com/adnsv/go-utils
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Functions
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Gray maps luminance to an index in standard ANSI 256-color palette
input values [0..ff] are snapped to - 0x00 - 0x0A - 0x14 - 0x1E - 0x28 - 0x33 - 0x3D - 0x47 - 0x51 - 0x5B - 0x66 - 0x70 - 0x7A - 0x84 - 0x8E - 0x99 - 0xA3 - 0xAD - 0xB7 - 0xC1 - 0xCC - 0xD6 - 0xE0 - 0xEA - 0xF4 - 0xFF
.
RGB maps rgb color to an index in standard ANSI 256-color palette
input color component values [0..ff] are snapped to - 0x00 - 0x33 - 0x66 - 0x99 - 0xcc - 0xff
.
SetupOutput prepares/validates an output to support virtual terminal escape sequences
Windows hosts: - configures terminal for UTF-8 output (65001 codepage) - enables virtual terminal processing mode
Other hosts (linux, bsd): - checks for termios support
Returns: - ok: indicates if the output supports virtual terminal escape sequences (will fail for regular files) - cleanup: to be used for restoring the output to its original state
.
SetupStdout configures os.Stdout to support virtual terminal escape sequences.
# Constants
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
# Structs
OutputState allows restoring terminal to its original state.
# Type aliases
An index into a standard 256-color ANSI palette.
No description provided by the author