Documentation
¶
Overview ¶
Package emoji provides standard tools for working with emoji unicode codes and aliases.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var GemojiData = Gemoji{}/* 1805 elements not displayed */
GemojiData is the original Gemoji data.
see: https://raw.githubusercontent.com/github/gemoji/master/db/emoji.json
Functions ¶
func ReplaceAliases ¶
ReplaceAliases replaces all aliases of the form ":alias:" with its corresponding unicode value.
func ReplaceAliasesWithEmoticons ¶
ReplaceAliasesWithEmoticons replaces all emoji aliases (in the form of :alias:) with its corresponding emoticon (ie, :D, :p, etc) (ie, the alias ":monkey_face:" will be replaced with ":o)").
func ReplaceCodes ¶
ReplaceCodes replaces all emoji codes with the first corresponding emoji alias (in the form of ":alias:") (ie, "\u2618" will be converted to ":shamrock:").
func ReplaceEmoticonsWithAliases ¶
ReplaceEmoticonsWithAliases replaces all emoticons (ie, :D, :p, etc) with the first corresponding emoji alias (in the form of :alias:) (ie, the monkey face emoticon ":o)" will be replaced with ":monkey_face:").
func ReplaceEmoticonsWithCodes ¶
ReplaceEmoticonsWithCodes replaces all emoticons (ie, :D, :p, etc) with the corresponding emoji code (ie, the monkey face emoticon ":o)" will be replaced with "\U0001f435").
Types ¶
type Emoji ¶
type Emoji struct { Emoji string `json:"emoji"` Description string `json:"description"` Category string `json:"category"` Aliases []string `json:"aliases"` Tags []string `json:"tags"` UnicodeVersion string `json:"unicode_version"` IOSVersion string `json:"ios_version"` }
Emoji represents a single emoji and associated data.
func FromAlias ¶
FromAlias retrieves the emoji data based on the provided alias in the form "alias" or ":alias:" (ie, "shamrock" or ":shamrock:" will return the Gemoji data for "shamrock").
func FromCode ¶
FromCode retrieves the emoji data based on the provided unicode code (ie, "\u2618" will return the Gemoji data for "shamrock").
func FromEmoticon ¶
FromEmoticon retrieves the emoji data based on the provided emoticon (ie, ":o)" will return the Gemoji data for "monkey face").