Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator holds the emoji mappings and the number of max emojis per block.
func New ¶
func New() *Generator
Returns a pointer to a Generator struct with maxEmojisPerBlock set to 2.
func (*Generator) GenerateEmojiPasta ¶
Generates the emoji pasta from the given text.
func (*Generator) SetMaxEmojisPerBlock ¶
Sets Generator.maxEmojisPerBlock to the given number. Returns an error is the given number is negative.
func (*Generator) WithCustomMappings ¶
Sets Generator.mappings to the given custom mappings. Example of a custom mapping is {"hi": ["✋", "👋"], "person": ["👦", "🧔"]...}
func (*Generator) WithDefaultMappings ¶
Sets Generator.mappings to the default emoji mappings.
Click to show internal directories.
Click to hide internal directories.