(ctx context.Context, keyword string)
| 20 | } |
| 21 | |
| 22 | func (i *imlTagModule) Search(ctx context.Context, keyword string) ([]*tag_dto.Item, error) { |
| 23 | items, err := i.tagService.Search(ctx, keyword, nil) |
| 24 | if err != nil { |
| 25 | return nil, err |
| 26 | } |
| 27 | out := utils.SliceToSlice(items, func(item *tag.Tag) *tag_dto.Item { |
| 28 | return &tag_dto.Item{ |
| 29 | Id: item.Id, |
| 30 | Name: item.Name, |
| 31 | } |
| 32 | }) |
| 33 | return out, nil |
| 34 | } |
| 35 | |
| 36 | func (i *imlTagModule) Create(ctx context.Context, input *tag_dto.CreateTag) error { |
| 37 | if input.Id == "" { |