README.md (view raw)
1# emoji :rocket: :school_satchel: :tada:
2[![build](https://github.com/enescakir/emoji/workflows/build/badge.svg?branch=master)](https://github.com/enescakir/emoji/actions)
3[![godoc](https://godoc.org/github.com/enescakir/emoji?status.svg)](https://godoc.org/github.com/enescakir/emoji)
4
5`emoji` is a minimalistic emoji library for Go. It lets you use emoji characters in strings.
6
7Inspired by [spatie/emoji](https://github.com/spatie/emoji)
8
9## Install :floppy_disk:
10``` bash
11go get github.com/enescakir/emoji
12```
13
14## Usage :surfer:
15```go
16package main
17
18import (
19 "fmt"
20
21 "github.com/enescakir/emoji"
22)
23
24func main() {
25 fmt.Printf("hello %v from %v\n",
26 emoji.WavingHand,
27 emoji.FlagsForFlagTurkey,
28 )
29 fmt.Printf("different skin tones. default: %v light: %v dark: %v\n",
30 emoji.ThumbsUp,
31 emoji.OkHand.Tone(emoji.Light),
32 emoji.CallMeHand.Tone(emoji.Dark),
33 )
34 fmt.Printf("emoji with multiple skins: %v\n",
35 emoji.PeopleHoldingHands.Tone(emoji.Light, emoji.Dark),
36 )
37}
38
39/* OUTPUT
40
41 hello 👋 from 🇹🇷
42 different skin tones. default: 👍 light: 👌🏻 dark: 🤙🏿
43 emoji with multiple skins: 🧑🏻🤝🧑🏿
44
45*/
46```
47
48This package contains Full Emoji List v12.0 based on [https://unicode.org/Public/emoji/12.0/emoji-test.txt](https://unicode.org/Public/emoji/12.0/emoji-test.txt).
49
50Also, you can generate country flag emoji with [ISO 3166 Alpha2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes:
51```go
52emoji.CountryFlag("tr") // 🇹🇷
53```
54
55## Testing :hammer:
56``` bash
57go test
58```
59
60## Todo :pushpin:
61* Add `godoc`
62* Add badges to README
63* Add benchmarks
64* Add emoji constant generator
65
66## Contributing :man_technologist:
67I am accepting PRs that add characters to the class.
68Please use [this list](http://unicode.org/emoji/charts/full-emoji-list.html) to look up the unicode value and the name of the character.
69
70## Credits :star:
71- [Enes Çakır](https://github.com/enescakir)
72
73## License :scroll:
74The MIT License (MIT). Please see [License File](LICENSE.md) for more information.