From fe59d61d7668e3ecc087fd22a0f272843fcb1dd5 Mon Sep 17 00:00:00 2001 From: Brian Buller Date: Tue, 26 Sep 2017 17:02:57 -0500 Subject: [PATCH] Support emoji :D --- main.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/main.go b/main.go index 74bc2c0..3db9387 100644 --- a/main.go +++ b/main.go @@ -3,6 +3,9 @@ package main import ( "fmt" "os" + "strings" + + "github.com/kyokomi/emoji" ) var emoticons map[string]string @@ -13,12 +16,14 @@ func main() { emt := "¯\\_(ツ)_/¯" if len(os.Args) > 1 { which := os.Args[1] - fmt.Println(which) if which == "help" { for k, v := range emoticons { fmt.Println(k, v) } os.Exit(0) + } else if which == "emoji" { + rest := strings.Join(os.Args[2:], " ") + emt = emoji.Sprint(rest) } else { if i, ok := emoticons[which]; ok { emt = i