package definition
import "github.com/yuin/goldmark-emoji/definition"
Index ¶
- type Emoji
- func NewEmoji(name string, unicode []rune, shortNames ...string) Emoji
- func (em *Emoji) IsUnicode() bool
- type Emojis
- type EmojisOption
Types ¶
type Emoji ¶
type Emoji struct { // Name is a name of this emoji. Name string // ShortNames is a shorter representation of this emoji. ShortNames []string // Unicode is an unicode representation of this emoji. Unicode []rune }
Emoji is a data structure that holds a single emoji.
func NewEmoji ¶
NewEmoji returns a new Emoji.
func (*Emoji) IsUnicode ¶
IsUnicode returns true if this emoji is defined in unicode, otherwise false.
type Emojis ¶
type Emojis interface { // Get returns (*Emoji, true) if found mapping associated with given short name, otherwise (nil, false). Get(shortName string) (*Emoji, bool) // Add adds new emojis to this collection. Add(Emojis) // Clone clones this collection. Clone() Emojis }
Emojis is a collection of emojis.
func Github ¶
func Github(opts ...EmojisOption) Emojis
func NewEmojis ¶
NewEmojis returns a new Emojis.
type EmojisOption ¶
type EmojisOption func(Emojis)
EmojisOption sets options for Emojis.
func WithEmojis ¶
func WithEmojis(emojis ...Emoji) EmojisOption
WithEmojis is an EmojisOption that adds emojis to the Emojis.
Source Files ¶
- Version
- v1.0.0
- Published
- Aug 22, 2020
- Platform
- windows/amd64
- Imports
- 1 packages
- Last checked
- 4 hours ago –
Tools for package owners.