Documentation ¶
Overview ¶
Package chat defines color and format codes and a set of helper functions.
Many, many thanks to #mcdevs from Freenode and it's great documentation: http://wiki.vg/Chat
Index ¶
Examples ¶
Constants ¶
View Source
const ( Black = "§0" // #000 DarkBlue = "§1" // #00a DarkGreen = "§2" // #0a0 DarkCyan = "§3" // #0aa DarkRed = "§4" // #a00 Purple = "§5" // #a0a Gold = "§6" // #fa0 Gray = "§7" // #aaa DarkGray = "§8" // #555 Blue = "§9" // #55f Green = "§a" // #5f5 Cyan = "§b" // #5ff Red = "§c" // #f55 Pink = "§d" // #f5f Yellow = "§e" // #ff5 White = "§f" // #fff Random = "§k" Bold = "§l" Strike = "§m" Underlined = "§n" Italic = "§o" Rest = "§r" )
Variables ¶
This section is empty.
Functions ¶
func Translate ¶
Translate translates strings using an alternate control sequence char to a string that uses '§' as control sequence char.
Example ¶
package main import ( "fmt" "github.com/minero/minero/chat" ) func main() { t := chat.Translate("Roses are &cred&r. Violets are &9blue§r. Let's f***!", "&") fmt.Println(t) }
Output: Roses are §cred§r. Violets are §9blue§r. Let's f***!
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.