(actors []api.AssignableActor, totalCount int)
| 683 | } |
| 684 | |
| 685 | func actorsToSearchResult(actors []api.AssignableActor, totalCount int) prompter.MultiSelectSearchResult { |
| 686 | logins := make([]string, 0, len(actors)) |
| 687 | displayNames := make([]string, 0, len(actors)) |
| 688 | |
| 689 | for _, a := range actors { |
| 690 | if a.Login() == "" { |
| 691 | continue |
| 692 | } |
| 693 | logins = append(logins, a.Login()) |
| 694 | if a.DisplayName() != "" { |
| 695 | displayNames = append(displayNames, a.DisplayName()) |
| 696 | } else { |
| 697 | displayNames = append(displayNames, a.Login()) |
| 698 | } |
| 699 | } |
| 700 | return prompter.MultiSelectSearchResult{ |
| 701 | Keys: logins, |
| 702 | Labels: displayNames, |
| 703 | MoreResults: totalCount, |
| 704 | } |
| 705 | } |
no test coverage detected