gmoji

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	LangEN = "en"
	LangZH = "zh-CN"
)

languages

Variables

This section is empty.

Functions

This section is empty.

Types

type Emoji

type Emoji struct {
	Name string
	Code string

	Emoji  string
	Entity string
	Semver string

	Description string
}

Emoji struct

func (*Emoji) ID

func (e *Emoji) ID() string

ID name

type EmojiMap

type EmojiMap map[string]*Emoji

EmojiMap data. key is code name: Emoji.ID()

func Emojis

func Emojis(lang string) (EmojiMap, error)

Emojis for given language

func MustEmojis

func MustEmojis(lang string) EmojiMap

MustEmojis load and get

func (EmojiMap) CodeToEmoji

func (em EmojiMap) CodeToEmoji(code string) string

CodeToEmoji convert

func (EmojiMap) FindOne

func (em EmojiMap) FindOne(keywords ...string) *Emoji

FindOne by keywords

func (EmojiMap) First

func (em EmojiMap) First() *Emoji

First emoji get

func (EmojiMap) Get

func (em EmojiMap) Get(name string) *Emoji

Get by code name

func (EmojiMap) Len

func (em EmojiMap) Len() int

Len of map

func (EmojiMap) Lookup

func (em EmojiMap) Lookup(name string) (*Emoji, bool)

Lookup by code name

func (EmojiMap) NameToEmoji

func (em EmojiMap) NameToEmoji(name string) string

NameToEmoji convert

func (EmojiMap) RenderCodes

func (em EmojiMap) RenderCodes(text string) string

RenderCodes to emojis

func (EmojiMap) Search

func (em EmojiMap) Search(keywords []string, limit int) EmojiMap

Search by keywords, will match name and description

func (EmojiMap) String

func (em EmojiMap) String() string

String format

Jump to

Keyboard shortcuts

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