utils

package
v0.0.0-...-47f63ad Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2020 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ColoredString

func ColoredString(str string, colorAttribute color.Attribute) string

ColoredString takes a string and a colour attribute and returns a colored string with that attribute

func ColoredStringDirect

func ColoredStringDirect(str string, colour *color.Color) string

ColoredStringDirect used for aggregating a few color attributes rather than just sending a single one

func Decolorise

func Decolorise(str string) string

Decolorise strips a string of color

func RenderStringsWithPadding

func RenderStringsWithPadding(stringArrays [][]string) (string, error)

RenderStringsWithPadding takes an array of rows each containing an array of columns, to be displayed with padding in a tabular form

func WithPadding

func WithPadding(str string, padding int) string

WithPadding pads a string as much as you want

Types

This section is empty.

Jump to

Keyboard shortcuts

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