2020-11-28 13:14:48 +11:00
|
|
|
package presentation
|
|
|
|
|
2020-11-28 19:53:39 +11:00
|
|
|
import (
|
|
|
|
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
2023-07-24 13:06:42 +10:00
|
|
|
"github.com/samber/lo"
|
2020-11-28 19:53:39 +11:00
|
|
|
)
|
|
|
|
|
|
|
|
func GetSuggestionListDisplayStrings(suggestions []*types.Suggestion) [][]string {
|
2023-07-24 13:06:42 +10:00
|
|
|
return lo.Map(suggestions, func(suggestion *types.Suggestion, _ int) []string {
|
2022-03-19 19:12:58 +11:00
|
|
|
return getSuggestionDisplayStrings(suggestion)
|
|
|
|
})
|
2020-11-28 13:14:48 +11:00
|
|
|
}
|
|
|
|
|
2020-11-28 19:53:39 +11:00
|
|
|
func getSuggestionDisplayStrings(suggestion *types.Suggestion) []string {
|
|
|
|
return []string{suggestion.Label}
|
2020-11-28 13:14:48 +11:00
|
|
|
}
|