colorable

package module
v0.0.0-...-99a0af7 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2015 License: MIT Imports: 2 Imported by: 6

README

go-colorable-wrapper

Wrapper over github.com/mattn/go-colorable that provides helper functions and variables

Print methods

Mimic functions from standard fmt package but make them colorable-aware. Include

  • colorable.Print
  • colorable.Printf
  • colorable.Println

Colorable-aware streams

Provides colorable.Stderr and colorable.Stdout variables. They have the same capabilities as os.Stderr and os.Stdout, but colorable-aware

ANSI codes

Provides functions to output colored text, change background color, or add some text effect such as bold or underline

Documentation

Overview

Provides some predefines ANSI codes to change foreground/background colors or apply text effects

Provides convience methods to print information to color-aware terminal

Provides colorable stdout and stderr streams

Index

Constants

This section is empty.

Variables

Colorable-aware stderr, similar to os.Stderr

Colorable-aware stdout, similar to os.Stdout

Functions

func Blue

func Blue(s string) string

Blue text

func Bold

func Bold(s string) string

Bold text effect

func Cyan

func Cyan(s string) string

Cyan text

func DarkRed

func DarkRed(s string) string

Dark red text

func Fade

func Fade(s string) string

Fade text effect

func Gray

func Gray(s string) string

Gray text

func Green

func Green(s string) string

Green text

func Greenbg

func Greenbg(s string) string

Green background

func Invert

func Invert(s string) string

Inverted text effect

func Print

func Print(a ...interface{}) (n int, err error)

Mimics fmt.Print

func Printf

func Printf(format string, a ...interface{}) (n int, err error)

Mimics fmt.Printf

func Println

func Println(a ...interface{}) (n int, err error)

Mimics fmt.Println

func Red

func Red(s string) string

Red text

func Redbg

func Redbg(s string) string

Red background

func Underline

func Underline(s string) string

Underline text effect

func Yellow

func Yellow(s string) string

Yellow text

Types

This section is empty.

Jump to

Keyboard shortcuts

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