package chinese import ( "github.com/go-ego/gpy" "strings" ) func FirstPinYin(r string) string { args := gpy.NewArgs() ss := gpy.Pinyin(r, args) if len(ss) == 0 { return "#" } if len(ss[0]) == 0 { return "#" } return strings.ToUpper(string(ss[0][0][0])) }