console

package
v1.4.4 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2017 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IntToCheckmark

func IntToCheckmark(i int) string

IntToCheckmark returns a string with ansi color instruction characters: a red ✘ if the argument is zero, a green ✔ otherwise.

func StringToCheckmark

func StringToCheckmark(s string) string

StringToCheckmark returns a string with ansi color instruction characters: a red ✘ if the argument is "0", a yellow ? if the argument is "", a green ✔ otherwise.

Types

type Checkmark

type Checkmark string

Checkmark type is a string with some functions attached.

func Itoc

func Itoc(i int) Checkmark

Itoc returns a Checkmark from an int.

func Stoc

func Stoc(s string) Checkmark

Stoc returns a Checkmark from a string.

func (Checkmark) Inverse

func (c Checkmark) Inverse() Checkmark

Inverse returns the opposite of the given Checkmark: a red ✘ if the argument is a green ✔ and vice versa, a yellow ? otherwise.

func (Checkmark) String

func (c Checkmark) String() string

Jump to

Keyboard shortcuts

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