MCPcopy Index your code
hub / github.com/enescakir/emoji

github.com/enescakir/emoji @v1.0.0

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.0.0 ↗ · + Follow
82 symbols 202 edges 14 files 30 documented · 37% 7 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

emoji :rocket: :school_satchel: :tada:

Build Status godoc Go Report Card Codecov MIT License

emoji is a minimalistic emoji library for Go. It lets you use emoji characters in strings.

Inspired by spatie/emoji

Install :floppy_disk:

go get github.com/enescakir/emoji

Usage :surfer:

package main

import (
    "fmt"

    "github.com/enescakir/emoji"
)

func main() {
    fmt.Printf("Hello %v\n", emoji.WavingHand)
    fmt.Printf("I am %v from %v\n",
        emoji.ManTechnologist,
        emoji.FlagForTurkey,
    )
    fmt.Printf("Different skin tones.\n  default: %v light: %v dark: %v\n",
        emoji.ThumbsUp,
        emoji.OkHand.Tone(emoji.Light),
        emoji.CallMeHand.Tone(emoji.Dark),
    )
    fmt.Printf("Emojis with multiple skin tones.\n  both medium: %v light and dark: %v\n",
        emoji.PeopleHoldingHands.Tone(emoji.Medium),
        emoji.PeopleHoldingHands.Tone(emoji.Light, emoji.Dark),
    )
    fmt.Println(emoji.Parse("Emoji aliases are :sunglasses:"))
    emoji.Println("Use fmt wrappers :+1: with emoji support :tada:")
}

/* OUTPUT

    Hello 👋
    I am 👨‍💻 from 🇹🇷
    Different skin tones.
      default: 👍 light: 👌🏻 dark: 🤙🏿
    Emojis with multiple skin tones.
      both medium: 🧑🏽‍🤝‍🧑🏽 light and dark: 🧑🏻‍🤝‍🧑🏿
    Emoji aliases are 😎
    Use fmt wrappers 👍 with emoji support 🎉
*/

This package contains emojis constants based on Full Emoji List v13.0.

emoji.CallMeHand // 🤙
emoji.CallMeHand.Tone(emoji.Dark) // 🤙🏿

Also, it has additional emoji aliases from github/gemoji.

emoji.Parse(":+1:") // 👍
emoji.Parse(":100:") // 💯

You can generate country flag emoji with ISO 3166 Alpha2 codes:

emoji.CountryFlag("tr") // 🇹🇷
emoji.CountryFlag("US") // 🇺🇸
emoji.Parse("country flag alias :flag-gb:") // country flag alias 🇬🇧

All constants are generated by internal/generator.

Testing :hammer:

go test

Todo :pushpin:

  • Add examples to godoc

Contributing :man_technologist:

I am accepting PRs that add aliases to the package. You have to add it to customEmojis list at internal/generator/main.

If you think an emoji constant is not correct, open an issue. Please use this list to look up the correct unicode value and the name of the character.

Credits :star:

License :scroll:

The MIT License (MIT). Please see License File for more information.

Core symbols most depended-on inside this repo

newEmojiWithTone
called by 283
emoji.go
withDefaultTone
called by 17
emoji.go
String
called by 16
emoji.go
Parse
called by 6
parser.go
Sprint
called by 5
fmt.go
Sprintf
called by 4
fmt.go
Tone
called by 4
emoji.go
CountryFlag
called by 4
emoji.go

Shape

Function 62
Method 12
Struct 6
TypeAlias 2

Languages

Go100%

Modules by API surface

internal/generator/unicode.go15 symbols
emoji.go11 symbols
fmt_test.go10 symbols
fmt.go10 symbols
emoji_test.go10 symbols
internal/generator/main.go7 symbols
parser_test.go6 symbols
parser.go6 symbols
internal/generator/strutil.go4 symbols
internal/generator/gemoji.go2 symbols
map_test.go1 symbols

For agents

$ claude mcp add emoji \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page