1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-01-26 05:37:18 +02:00
lazygit/pkg/gui/presentation/submodules.go

18 lines
514 B
Go
Raw Normal View History

2020-09-30 08:27:23 +10:00
package presentation
import (
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/theme"
"github.com/samber/lo"
2020-09-30 08:27:23 +10:00
)
func GetSubmoduleListDisplayStrings(submodules []*models.SubmoduleConfig) [][]string {
return lo.Map(submodules, func(submodule *models.SubmoduleConfig, _ int) []string {
2022-03-19 19:12:58 +11:00
return getSubmoduleDisplayStrings(submodule)
})
2020-09-30 08:27:23 +10:00
}
func getSubmoduleDisplayStrings(s *models.SubmoduleConfig) []string {
return []string{theme.DefaultTextColor.Sprint(s.Name)}
2020-09-30 08:27:23 +10:00
}