1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
lazygit/pkg/gui/presentation/suggestions.go

17 lines
456 B
Go
Raw Normal View History

package presentation
import (
2022-03-19 10:12:58 +02:00
"github.com/jesseduffield/generics/slices"
"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)
})
}
func getSuggestionDisplayStrings(suggestion *types.Suggestion) []string {
return []string{suggestion.Label}
}