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

18 lines
531 B
Go
Raw Normal View History

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