package service import ( "gim/internal/business/comm/db" "gim/pkg/pb" ) func EmoticonList(masterId string) ([]*pb.Emoticon, error) { emoticons, err := db.DbEmoticon.EmoticonFind(masterId) if err != nil { return nil, err } pbEmoticons := make([]*pb.Emoticon, len(*emoticons)) for i, v := range *emoticons { pbEmoticons[i] = v.ToProto() } return pbEmoticons, nil }