1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2024-12-12 11:15:00 +02:00
lazygit/pkg/gui/presentation/submodules.go
2022-03-24 20:14:41 +11:00

18 lines
531 B
Go

package presentation
import (
"github.com/jesseduffield/generics/slices"
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/theme"
)
func GetSubmoduleListDisplayStrings(submodules []*models.SubmoduleConfig) [][]string {
return slices.Map(submodules, func(submodule *models.SubmoduleConfig) []string {
return getSubmoduleDisplayStrings(submodule)
})
}
func getSubmoduleDisplayStrings(s *models.SubmoduleConfig) []string {
return []string{theme.DefaultTextColor.Sprint(s.Name)}
}