2020-11-28 04:14:48 +02:00
|
|
|
package presentation
|
|
|
|
|
2020-11-28 10:53:39 +02:00
|
|
|
import (
|
2022-03-19 10:12:58 +02:00
|
|
|
"github.com/jesseduffield/generics/slices"
|
2020-11-28 10:53:39 +02:00
|
|
|
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
|
|
|
)
|
|
|
|
|
|
|
|
func GetSuggestionListDisplayStrings(suggestions []*types.Suggestion) [][]string {
|
2022-03-19 10:12:58 +02:00
|
|
|
return slices.Map(suggestions, func(suggestion *types.Suggestion) []string {
|
|
|
|
return getSuggestionDisplayStrings(suggestion)
|
|
|
|
})
|
2020-11-28 04:14:48 +02:00
|
|
|
}
|
|
|
|
|
2020-11-28 10:53:39 +02:00
|
|
|
func getSuggestionDisplayStrings(suggestion *types.Suggestion) []string {
|
|
|
|
return []string{suggestion.Label}
|
2020-11-28 04:14:48 +02:00
|
|
|
}
|