decorators

package
v3.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	PropertyMap map[string]Decorator = map[string]Decorator{
		"obfuscated":    Obfuscated,
		"bold":          Bold,
		"strikethrough": Strikethrough,
		"underlined":    Underlined,
		"italic":        Italic,
	}
)

Functions

This section is empty.

Types

type Decorator

type Decorator string

Decorator is a type of text decorator (bold, underline, etc.)

var (
	// Obfuscated is a decorator used to specify text is obfuscated (§k)
	Obfuscated Decorator = "obfuscated"
	// Bold is a decorator used to specify text is bold (§k)
	Bold Decorator = "bold"
	// Strikethrough is a decorator used to specify text has a strikethrough (§m)
	Strikethrough Decorator = "strikethrough"
	// Underlined is a decorator used to specify text has an underline (§n)
	Underlined Decorator = "underline"
	// Italic is a decorator used to specify text uses italics (§o)
	Italic Decorator = "italic"
	// Unknown is an unknown parsed decorator
	Unknown Decorator = "unknown"
)

func Parse

func Parse(value interface{}) (Decorator, bool)

Parse attempts to return a Decorator type based on a formatting code string, formatting name string, or a Decorator type itself

func (Decorator) ToRaw

func (d Decorator) ToRaw() string

Jump to

Keyboard shortcuts

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