Converts a string country code to an emoji in Go.
##TODO:
- Return emoji with the same actual length (which was printed)
- Find the emoji with nearly correct country name/code.
go get -u github.com/yudgnahk/go-emoji-flags
Will return a flag, or an empty string if the flag does not found.
package main
import (
"fmt"
emoji "github.com/yudgnahk/go-emoji-flags"
)
func main() {
fmt.Println(emoji.GetFlag("VNM")) // prints 🇻🇳
fmt.Println(emoji.GetFlag("VN")) // prints 🇻🇳
fmt.Println(emoji.GetFlag("BOB")) // prints
}
... and wikipedia for the understanding about countries code (especially ISO_3166) (https://en.wikipedia.org/wiki/ISO_3166-2:GB)
I was stuck on the countries that belongs to Great Britain, which doesn't have the same format as origin emojis (go-emoji-flag does not support these countries)