add example to Format()
This commit is contained in:
parent
b3a8d41f87
commit
db18e4cde1
@ -41,6 +41,10 @@ var colors = []*color{
|
||||
|
||||
// Format takes color strings like "{red}" and turns them into the resulting
|
||||
// ASCII color code for IRC.
|
||||
//
|
||||
// For example:
|
||||
//
|
||||
// client.Message("#channel", Format("{red}{bold}Hello World{c}"))
|
||||
func Format(text string) string {
|
||||
for i := 0; i < len(colors); i++ {
|
||||
for a := 0; a < len(colors[i].aliases); a++ {
|
||||
|
Loading…
Reference in New Issue
Block a user