all repos — emoji @ v0.0.1

A minimalistic emoji package for Go (golang)

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
13package main
14
15import (
16    "fmt"
17
18    "github.com/enescakir/emoji"
19)
20
21func 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
45This 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).
46
47Also, you can generate country flag emoji with [ISO 3166 Alpha2](https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2) codes:
48```go
49emoji.CountryFlag("tr") // 🇹🇷
50```
51
52## Testing :hammer:
53``` bash
54go test
55```
56
57## Todo :pushpin:
58* Add `godoc`
59* Add badges to README
60* Add tests
61* Add emoji constant generator
62
63## Contributing :man_technologist:
64I am accepting PRs that add characters to the class.
65Please use [this list](http://unicode.org/emoji/charts/full-emoji-list.html) to look up the unicode value and the name of the character.
66
67## Credits :star:
68- [Enes Çakır](https://github.com/enescakir)
69
70## License :scroll:
71The MIT License (MIT). Please see [License File](LICENSE.md) for more information.