You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

emoticon_service.go 361 B

1 week ago
1 week ago
1 week ago
1 week ago
1 week ago
123456789101112131415161718
  1. package service
  2. import (
  3. "egg-im/internal/business/comm/db"
  4. "egg-im/pkg/pb"
  5. )
  6. func EmoticonList() ([]*pb.Emoticon, error) {
  7. emoticons, err := db.DbEmoticon.EmoticonFind()
  8. if err != nil {
  9. return nil, err
  10. }
  11. pbEmoticons := make([]*pb.Emoticon, len(*emoticons))
  12. for i, v := range *emoticons {
  13. pbEmoticons[i] = v.ToProto()
  14. }
  15. return pbEmoticons, nil
  16. }