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