0
点赞
收藏
分享

微信扫一扫

Golang:输出Emoji表情符号


Emoji is a simple golang package.

译文:Emoji是一个简单的golang包。

文档

  • ​​https://github.com/kyokomi/emoji​​
  • ​​https://pkg.go.dev/github.com/kyokomi/emoji/v2​​

安装

go get github.com/kyokomi/emoji/v2

示例

package main

import (
"fmt"

"github.com/kyokomi/emoji/v2"
)

func main() {
fmt.Println("Hello World Emoji!")
// Hello World Emoji!

emoji.Println(":beer: Beer!!!")
// 🍺 Beer!!!

pizzaMessage := emoji.Sprint("I like a :pizza: and :sushi:!!")
fmt.Println(pizzaMessage)
// I like a 🍕 and 🍣 !!
}

输出结果

Golang:输出Emoji表情符号_后端

了解更多的emoji符号和知识

一本线上的emoji表情百科全书 https://emojixd.com/

emoji-v5:https://raw.githubusercontent.com/CodeFreezr/emojo/master/db/v5/emoji-v5.json

unicode编码:http://www.unicode.org/emoji/charts/emoji-list.html

gemoji符号:https://raw.githubusercontent.com/github/gemoji/master/db/emoji.json

iamcal:https://github.com/iamcal/emoji-data/raw/master/emoji.json

参考
​​​「Go工具箱」通过这个工具包,你就能了解每天使用的表情符号是怎么来的​​


举报

相关推荐

0 条评论