text

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2020 License: MIT Imports: 2 Imported by: 71

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ANSI

func ANSI(a ...interface{}) string

ANSI converts all Minecraft text formatting codes in the values passed to ANSI formatting codes, so that it may be displayed properly in the terminal.

func Minecraft added in v0.12.0

func Minecraft(a ...interface{}) string

Minecraft converts all ANSI text formatting codes in the values passed to Minecraft formatting codes, so that it may be displayed in-game.

Types

type FormatFunc added in v0.12.0

type FormatFunc func(a ...interface{}) string

FormatFunc represents a function that may be called on a list of values to format the values and apply a colour or format on them, such as making the text bold. The formatting on the values passed is done using Minecraft formatting codes. To turn it into a string that may be printed, use text.ANSI(string).

func Aqua added in v0.12.0

func Aqua() FormatFunc

Aqua returns an aqua formatter.

func Black added in v0.12.0

func Black() FormatFunc

Black returns a black formatter.

func Blue added in v0.12.0

func Blue() FormatFunc

Blue returns a blue formatter.

func Bold added in v0.12.0

func Bold() FormatFunc

Bold returns a bold formatter.

func DarkAqua added in v0.12.0

func DarkAqua() FormatFunc

DarkAqua returns a dark aqua formatter.

func DarkBlue added in v0.12.0

func DarkBlue() FormatFunc

DarkBlue returns a dark blue formatter.

func DarkGreen added in v0.12.0

func DarkGreen() FormatFunc

DarkGreen returns a dark green formatter.

func DarkGrey added in v0.12.0

func DarkGrey() FormatFunc

DarkGrey returns a dark grey formatter.

func DarkPurple added in v0.12.0

func DarkPurple() FormatFunc

DarkPurple returns a dark purple formatter.

func DarkRed added in v0.12.0

func DarkRed() FormatFunc

DarkRed returns a dark red formatter.

func DarkYellow added in v1.3.10

func DarkYellow() FormatFunc

DarkYellow returns a dark yellow formatter.

func Gold added in v0.12.0

func Gold() FormatFunc

Gold returns a gold formatter.

func Green added in v0.12.0

func Green() FormatFunc

Green returns a green formatter.

func Grey added in v0.12.0

func Grey() FormatFunc

Grey returns a grey formatter.

func Italic added in v0.12.0

func Italic() FormatFunc

Italic returns an italic formatter.

func Obfuscated added in v0.12.0

func Obfuscated() FormatFunc

Obfuscated returns an obfuscated formatter.

func Purple added in v0.12.0

func Purple() FormatFunc

Purple returns a purple formatter.

func Red added in v0.12.0

func Red() FormatFunc

Red returns a red formatter.

func Strikethrough added in v0.12.0

func Strikethrough() FormatFunc

Strikethrough returns a strikethrough formatter.

func White added in v0.12.0

func White() FormatFunc

White returns a white formatter.

func Yellow added in v0.12.0

func Yellow() FormatFunc

Yellow returns a yellow formatter.

Jump to

Keyboard shortcuts

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