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

22 lines
561 B
Go
Raw Normal View History

2020-09-30 00:27:23 +02:00
package presentation
import (
"github.com/jesseduffield/lazygit/pkg/commands/models"
"github.com/jesseduffield/lazygit/pkg/theme"
"github.com/jesseduffield/lazygit/pkg/utils"
)
func GetSubmoduleListDisplayStrings(submodules []*models.SubmoduleConfig) [][]string {
lines := make([][]string, len(submodules))
for i := range submodules {
lines[i] = getSubmoduleDisplayStrings(submodules[i])
}
return lines
}
func getSubmoduleDisplayStrings(s *models.SubmoduleConfig) []string {
return []string{utils.ColoredString(s.Name, theme.DefaultTextColor)}
}