mirror of
https://github.com/jesseduffield/lazydocker.git
synced 2026-07-25 08:31:03 +00:00
fixed linting issues
This commit is contained in:
parent
341f173a68
commit
364f399d26
2 changed files with 6 additions and 5 deletions
|
|
@ -402,7 +402,8 @@ func (c *PodmanCommand) RefreshContainersAndServices(currentServices []*Service,
|
|||
|
||||
// buildContainerListItems creates a unified list of pods and containers
|
||||
func (c *PodmanCommand) buildContainerListItems(containers []*Container, podSummaries []PodSummary) []*ContainerListItem {
|
||||
var items []*ContainerListItem
|
||||
// Pre-allocate: pods + containers (max possible size)
|
||||
items := make([]*ContainerListItem, 0, len(podSummaries)+len(containers))
|
||||
|
||||
// Create a map of pod ID -> pod summary
|
||||
podMap := make(map[string]PodSummary)
|
||||
|
|
|
|||
|
|
@ -6,10 +6,10 @@ import (
|
|||
"strconv"
|
||||
"strings"
|
||||
|
||||
"github.com/fatih/color"
|
||||
"github.com/christophe-duc/lazypodman/pkg/commands"
|
||||
"github.com/christophe-duc/lazypodman/pkg/config"
|
||||
"github.com/christophe-duc/lazypodman/pkg/utils"
|
||||
"github.com/fatih/color"
|
||||
"github.com/samber/lo"
|
||||
)
|
||||
|
||||
|
|
@ -47,10 +47,10 @@ func GetContainerListItemDisplayStrings(guiConfig *config.GuiConfig, item *comma
|
|||
func GetPodDisplayStrings(guiConfig *config.GuiConfig, pod *commands.Pod) []string {
|
||||
return []string{
|
||||
getPodDisplayStatus(guiConfig, pod),
|
||||
"", // No substatus for pods
|
||||
"", // No substatus for pods
|
||||
utils.ColoredString(pod.Name, color.FgCyan),
|
||||
"", // No CPU% for pods
|
||||
"", // No ports for pods
|
||||
"", // No CPU% for pods
|
||||
"", // No ports for pods
|
||||
utils.ColoredString(fmt.Sprintf("(%d containers)", len(pod.Containers)), color.FgMagenta),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue