(actors []api.AssignableActor, totalCount int)
| 698 | } |
| 699 | |
| 700 | func actorsToSearchResult(actors []api.AssignableActor, totalCount int) prompter.MultiSelectSearchResult { |
| 701 | logins := make([]string, 0, len(actors)) |
| 702 | displayNames := make([]string, 0, len(actors)) |
| 703 | |
| 704 | for _, a := range actors { |
| 705 | if a.Login() == "" { |
| 706 | continue |
| 707 | } |
| 708 | logins = append(logins, a.Login()) |
| 709 | if a.DisplayName() != "" { |
| 710 | displayNames = append(displayNames, a.DisplayName()) |
| 711 | } else { |
| 712 | displayNames = append(displayNames, a.Login()) |
| 713 | } |
| 714 | } |
| 715 | return prompter.MultiSelectSearchResult{ |
| 716 | Keys: logins, |
| 717 | Labels: displayNames, |
| 718 | MoreResults: totalCount, |
| 719 | } |
| 720 | } |
no test coverage detected